Lab 5: AD GPO SW Deploy - FlameSpyro/Tech-Journal GitHub Wiki

Summary

This lab is very simple and easy. Due to issues with my network due to the mass deletion of my machines, they were unable to work. However, the concepts of using PowerShell to manage OUS and the event log are listed here!

Lab

  • To create an OU within PowerShell use the command of New-ADOrganizationalUnit -Name "UserAccounts" -Path "DC=eric,DC=local"

  • Some OUS may be protected and need a few extra commands to delete: Get-ADOrganizationalUnit -Identity 'OU=Test,DC=eric,DC=local' | Set-ADObject -ProtectedFromAccidentalDeletion:$false -PassThru | Remove-ADOrganizationalUnit -Confirm:$false

  • To move a PC to ou use the following: Get-ADComputer “WKS01-eric” |Move-ADObject -TargetPath "OU=Test,DC=eric,DC=local"

  • This is similar to moving users aswell: Get-ADUSer “eric.burdick” |Move-ADObject -TargetPath "OU=Test,DC=eric,DC=local"

  • For the event log the command is Get-EventLog -LogName System -InstanceId 302