Tutorial by Examples

#Add the ActiveDirectory Module to current PowerShell Session Import-Module ActiveDirectory
Retrieve Active Directory User Get-ADUser -Identity JohnSmith Retrieve All Properties Associated with User Get-ADUser -Identity JohnSmith -Properties * Retrieve Selected Properties for User Get-ADUser -Identity JohnSmith -Properties * | Select-Object -Property sAMAccountName, Name, Mail ...
Retrieve Active Directory Group Get-ADGroup -Identity "My-First-Group" #Ensure if group name has space quotes are used Retrieve All Properties Associated with Group Get-ADGroup -Identity "My-First-Group" -Properties * Retrieve All Members of a Group Get-ADGroupMember -Id...
Retrieve AD Computer Get-ADComputer -Identity "JohnLaptop" Retrieve All Properties Associated with Computer Get-ADComputer -Identity "JohnLaptop" -Properties * Retrieve Select Properties of Computer Get-ADComputer -Identity "JohnLaptop" -Properties * | Select-O...
Retrieve an Active Directory Object #Identity can be ObjectGUID, Distinguished Name or many more Get-ADObject -Identity "ObjectGUID07898" Move an Active Directory Object Move-ADObject -Identity "CN=JohnSmith,OU=Users,DC=Domain,DC=Local" -TargetPath "OU=SuperUser,DC=Do...

Page 1 of 1