Skip to content

Instantly share code, notes, and snippets.

@jespernohr
Created September 29, 2015 10:16
Show Gist options
  • Save jespernohr/2eaa88e52008a3643b72 to your computer and use it in GitHub Desktop.
Save jespernohr/2eaa88e52008a3643b72 to your computer and use it in GitHub Desktop.
# use theese cmd-lets to create managed service accounts in Active Directory
# these new service accounts can be used on servers that share a specific computer group.
New-ADServiceAccount -name gmsa001 -DNSHostName gmsa001.contoso.com -PrincipalsAllowedToRetrieveManagedPassword "Domain Controllers"
New-ADServiceAccount -name gmsa002 -DNSHostName gmsa002.contoso.com -PrincipalsAllowedToRetrieveManagedPassword "Web Servers"
New-ADServiceAccount -name gmsa003 -DNSHostName gmsa003.contoso.com -PrincipalsAllowedToRetrieveManagedPassword "SQL Servers"
New-ADServiceAccount -name gmsa004 -DNSHostName gmsa004.contoso.com -PrincipalsAllowedToRetrieveManagedPassword "File Servers"
New-ADServiceAccount -name gmsa005 -DNSHostName gmsa005.contoso.com -PrincipalsAllowedToRetrieveManagedPassword "RDS Servers"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment