Pode icon indicating copy to clipboard operation
Pode copied to clipboard

Error in "Add-PodeAuthWindowsAd" command on MAC

Open Ankit-Sharma-ggn opened this issue 1 year ago • 2 comments

Describe the Bug

Error in "Add-PodeAuthWindowsAd" command on MAC. When I check the Authentication.ps1 having functions related to authentication. line number - 2111 $dn = (dnsdomainname) is not wokring on MAC.

Error

. '/Users/Ankit_Sharma-GGN/projects/Studies/PowerShell/web/server.ps1' Pode v2.10.1 (PID: 1124) dnsdomainname: /Users/Ankit_Sharma-GGN/.local/share/powershell/Modules/Pode/2.10.1/Private/Authentication.ps1:2111:16 Line | 2111 | $dn = (dnsdomainname) | ~~~~~~~~~~~~~ | The term 'dnsdomainname' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is | correct and try again.

Platform

  • OS: MAC

Ankit-Sharma-ggn avatar Jul 05 '24 06:07 Ankit-Sharma-ggn

I've transferred the issue over to Pode, as this bug is within Pode itself.

@Ankit-Sharma-ggn, does the following work instead?

/usr/sbin/realm list --name-only

If not, do you happen to know what the equivalent of the above and dnsdomainname is on MacOS?

Badgerati avatar Jul 08 '24 18:07 Badgerati

this worked for me

scutil --dns | grep -m 1 "search domain\[0\]" | cut -d ":" -f 2

Ankit-Sharma-ggn avatar Jul 14 '24 14:07 Ankit-Sharma-ggn