mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-08-10 13:20:33 +02:00
cmd/cli: fix typo in powershell command to get domain
This commit is contained in:
@@ -34,7 +34,7 @@ func addExtraSplitDnsRule(lc *ctrld.ListenerConfig) {
|
|||||||
|
|
||||||
// getActiveDirectoryDomain returns AD domain name of this computer.
|
// getActiveDirectoryDomain returns AD domain name of this computer.
|
||||||
func getActiveDirectoryDomain() (string, error) {
|
func getActiveDirectoryDomain() (string, error) {
|
||||||
cmd := "$obj = GetWmiObject Win32_ComputerSystem; if ($obj.PartOfDomain) { $obj.Domain }"
|
cmd := "$obj = Get-WmiObject Win32_ComputerSystem; if ($obj.PartOfDomain) { $obj.Domain }"
|
||||||
output, err := powershell(cmd)
|
output, err := powershell(cmd)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("failed to get domain name: %w, output:\n\n%s", err, string(output))
|
return "", fmt.Errorf("failed to get domain name: %w, output:\n\n%s", err, string(output))
|
||||||
|
|||||||
Reference in New Issue
Block a user