-
Notifications
You must be signed in to change notification settings - Fork 72
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
Improved the RSAT installation process #93
Conversation
.EXAMPLE | ||
Test-IsElevated | ||
#> | ||
if (-not(Get-Module -Name 'ActiveDirectory' -ListAvailable)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The -not
condition here flips your if/true logic. Just need to either remove -net
or swap your $true
and $false
outputs. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove both -not
s as discussed, and this should be g2g.
.EXAMPLE | ||
Test-IsElevated | ||
#> | ||
if (-not(Get-Module -Name 'ActiveDirectory' -ListAvailable)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To resolve this issue I created two new functions:
TestIsRSATInstalled
which returns true if the RSAT AD PowerShell module is installed or false if notInstallRSATADPowerShell
which installs the RSAT AD PowerShell moduleInvoke-Locksmith
now has a simple check for the RSAT AD PowerShell module and calls the install function when needed.Please let me know if you see/experience any issues testing this. "It works on my system." :D