Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assumptive Nature - New-ADSIDirectoryContext #48

Open
jakedenyer-s24 opened this issue Mar 29, 2018 · 2 comments
Open

Assumptive Nature - New-ADSIDirectoryContext #48

jakedenyer-s24 opened this issue Mar 29, 2018 · 2 comments

Comments

@jakedenyer-s24
Copy link

jakedenyer-s24 commented Mar 29, 2018

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.

@lazywinadmin
Copy link
Owner

Thanks @jakedenyer-s24 for the feedback!

@jakedenyer-s24
Copy link
Author

jakedenyer-s24 commented Mar 30, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants