Advertisement
mariussm

Creating shadow principals

Sep 7th, 2015
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $g = Get-ADGroup -Identity "Domain Admins" -Server blue.goodworkaround.com
  2. New-ADObject -Type msDS-ShadowPrincipal -OtherAttributes @{
  3.     "msDS-ShadowPrincipalSid" = $g.SID
  4. } -Path "CN=Shadow Principal Configuration,CN=Services,CN=Configuration,DC=red,DC=goodworkaround,DC=com" -Name "BLUE.Domain Admins"
  5. $g = Get-ADGroup -Identity "My Global Group" -Server blue.goodworkaround.com
  6. New-ADObject -Type msDS-ShadowPrincipal -OtherAttributes @{
  7.     "msDS-ShadowPrincipalSid" = $g.SID
  8. } -Path "CN=Shadow Principal Configuration,CN=Services,CN=Configuration,DC=red,DC=goodworkaround,DC=com" -Name "BLUE.My Global Group"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement