Skip to content

Instantly share code, notes, and snippets.

@tostka
Created July 17, 2019 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tostka/5ea0a104948c20d3626ee1853d1ce5f3 to your computer and use it in GitHub Desktop.
Save tostka/5ea0a104948c20d3626ee1853d1ce5f3 to your computer and use it in GitHub Desktop.
Move ADUser back to original OU
# confirm $origOU was properly configured up in step 1.
$origOU ;
# move the ADUser object to the $origOU, note -whatif needs to be removed to execute
Move-ADObject -Identity $adu.ObjectGUID.guid -TargetPath $origOU -whatif ;
# confirm current location
get-aduser $adu.samaccountname | format-list dist* ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment