AdsiPS
AdsiPS copied to clipboard
Assumptive Nature - New-ADSIDirectoryContext
This is more of a suggestion that an issue.
I suggest removing the assumptive nature of the Forest and Domain Parameters using :
[Parameter(ParameterSetName = 'Domain')]
$DomainName = [System.DirectoryServices.ActiveDirectory.Domain]::Getcurrentdomain(),
[Parameter(ParameterSetName = 'Forest')]
$ForestName = [System.DirectoryServices.ActiveDirectory.Forest]::Getcurrentforest(),
This caused an issue when I was running the commands from a non-domain joined system. Even when I was providing the Parameters with my own values they would still fail - The only fix I was able to come up with was removing these default values.
Thanks @jakedenyer-s24 for the feedback!
No Problem!
Also this has been a huge help to me. My use case is probably in the minority - most people will probably be on a domain while using this.
Apparently I need to learn how to use GitHub.. Reopening.