30+ Handy PowerShell Active Directory Scripts
Get-IADUser:
Retrieve all users in a domain or container.
New-IADUser:
Create a new user object in Active Directory.
Set-IADUser:
Modify attributes of a user object in Active Directory.
Enable-UserCannotChangePassword:
Set the 'User Cannot Change Password' checkbox on the user account in ADUC.
Disable-UserCannotChangePassword:
Clears the 'User Cannot Change Password' checkbox on the user account in ADUC.
Get-IADComputer:
Retrieve all computer objects in a domain or container.
Get-IADGroup:
Retrieve all groups in a domain or container that match the specified conditions.
Get-IADEmptyGroup:
Retrieve all groups without members in a domain or container.
New-IADGroup:
Create a new group in Active Directory.
Get-IADGroupMember:
Retrieve the members of a group in Active Directory.
Add-IADGroupMember:
Add one or more objects to a group in Active Directory.
Remove-IADGroupMember:
Remove a member from a group in Active Directory.
Get-IADGroupMembership:
Retrieve all groups to which an object belongs.
Enable-IADObject:
Enable a user or computer object in Active Directory.
Disable-IADObject:
Disable a user or computer object in Active Directory.
Remove-IADObject:
Delete the specified object(s) in Active Directory.
Move-IADObject:
Move one or more objects to a different container in Active Directory.
Get-IADTombstoneUser:
Retrieve all deleted users in Active Directory.
Get-IADTombstoneObject:
Retrieve all deleted objects in Active Directory.
Get-IADTombstoneComputer:
Retrieve all deleted computers in Active Directory.
Get-IADDomainController:
Retrieve domain controller information.
Get-IADDomainController2:
Retrieve domain controllers.
Get-IADCurrentDomain:
Retrieve current domain information like Domain Controllers, DomainMode, Domain Masters, and Forest Root.
Get-IADCurrentForest:
Retrieve current forest information like Domains, Sites, ForestMode, RootDomain, and Forest masters.
Get-IADSubnet:
Retrieve the subnets in a forest or current site.
Get-IADSite:
Retrieve the site(s) information for a forest or current site.
Get-IADFSMORoleHolder:
Retrieve the forest and domain FSMO roles holders.
Get-IADDomainPasswordPolicy:
Retrieve the domain password policy.
New-IADPassword:
Generates a random password of the specified length.
Get-IADObjectSID:
Retrieve AD object's SID.
Get-IADObjectBySID:
Retrieve domain account for known SID.
Get-IADAltRecipient:
Get all objects which has an alternative recipient to receive e-mail.
Get-IADExchangeAdmin:
Retrieve all Exchange 2003 administrators.