Skip to content

Instantly share code, notes, and snippets.

@royashbrook
Created February 7, 2018 17:18
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 royashbrook/2dc0c9bbaef52e5da00ace078cc4604d to your computer and use it in GitHub Desktop.
Save royashbrook/2dc0c9bbaef52e5da00ace078cc4604d to your computer and use it in GitHub Desktop.
New-ADUser newdomainadmin -OtherAttributes @{displayname="new domain admin person"}
Set-ADAccountPassword newdomainadmin -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "plaintextpassword" -Force )
Get-ADGroup "Domain Admins"
Get-ADGroup "Domain Admins" | Add-ADGroupMember -Members (Get-ADUser newdomainadmin )
Get-ADGroup "Domain Admins"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment