Until that time, I need to post something. Here is a little bit of code you can see everywhere.
# Add Quest AD Management if installed, otherwise break
if (Get-PSSnapin -Registered Quest.ActiveRoles.ADManagement){
if (-not (Get-PSSnapin Quest.ActiveRoles.ADManagement)){
Add-PSSnapin Quest.ActiveRoles.ADManagement
}
}
else{
Write-Error "Quest Active Directory Snapin not installed!!!!"
break;
}
# Import the AD module
if (-not (Get-Module ActiveDirectory)){
Import-Module ActiveDirectory -Force | out-null
}
No comments:
Post a Comment