Disable loading the default drive ‘AD:’ during import-module

All of you who have used the Active Directory (AD) powershell module would have noticed that every time you import the AD module, a default drive ‘AD:’ is also loaded. So when you type the following command: Import-module ActiveDirectory You see a progress bar with a message like following: Basically, during the import-module phase, the…

6

Find out when your Password Expires

Few weeks ago I came across this question “How to find out an account’s password expiration date” in one of our internal mailing-list. This looks like a simple question, but when we tried to find the answer we realized it is not a trivial task. One of my colleagues pointed to this 22-printed page detailed…

26

Adding/removing members from another forest or domain to groups in Active Directory

Adding/removing members belonging to the same domain from a group is very simple using AD Powershell cmdlets. All you have to do is pass an identifier (either samAccountName, distinguishedName, securityIdentifier or GUID) of the member and group to one of the membership cmdlets: · Add-ADGroupMember · Remove-ADGroupMember · Add-ADPrincipalGroupMembership · Remove-ADPrincipalGroupMembership Example: C:\PS> Add-ADGroupMember SvcAccPSOGroup…

18