Skip to content

Failed to load ActiveDirectory module fix#1013

Merged
dpaulson45 merged 1 commit into
mainfrom
dpaul-HcAdPermissionsFix
May 10, 2022
Merged

Failed to load ActiveDirectory module fix#1013
dpaulson45 merged 1 commit into
mainfrom
dpaul-HcAdPermissionsFix

Conversation

@dpaulson45
Copy link
Copy Markdown
Member

Issue:

Failed to load Active Directory module, then proceed to try to remove the PSDrive, even though we never created one.

Fix:
Set a variable to true after running New-PSDrive, then in finally block only run Remove-PSDrive if variable is set to true.

Validation:
Customer confirmed fix.

Resolved #1012

We can't remove the PSDrive if we fail to load the module or never created the New-PSDrive. Set a variable to true after creating the drive, then in finally block only remove it if it is set to true.
@dpaulson45 dpaulson45 merged commit a4d9b0e into main May 10, 2022
@dpaulson45 dpaulson45 deleted the dpaul-HcAdPermissionsFix branch May 10, 2022 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Issue] - Health Checker Object reference not set to an instance of an object Get-ExchangeAdPermissions

3 participants