AD GPO - jjcaful/Tech-Journal GitHub Wiki

AD - Group Policy Objects

To create an OU via powershell, simply run the following: New-ADOrganizationalUnit "[name here]" To delete an OU via powershell, run the following: Remove-ADOrganizationalUnit -Identity "OU=[name],DC=DOMAIN_CONTROLLER,DC=local" To move an item to a new OU via powershell, run the following: Get-ADComputer [COMPUTER NAME] |Move-ADObject -TargetPath "OU=[OU_GROUP],DC=[DOMAIN],DC=local" -Verbose or for a user object: Get-ADUser [USER NAME] |Move-ADObject -TargetPath "OU=[OU_GROUP],DC=[DOMAIN],DC=local" -Verbose to search through the event viewer in powershell, use the following command: Get-EventLog -LogName System -Index [INDEX] (in many cases, you can first find the relevant info through the GUI Event Viewer tool)