Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
9 lines (8 sloc) 527 Bytes
$ProdPrincipal = 'Domain Admins'
$ProdDC = 'dc.ad.prevenity.com'
$ShadowSuffix = 'PROD-'
$ProdShadowPrincipal = Get-ADGroup -Identity $ProdPrincipal -Properties ObjectSID -Server $ProdDC
$ShadowPrincipalContainer = 'CN=Shadow Principal Configuration,CN=Services,'+(Get-ADRootDSE).
configurationNamingContext
New-ADObject -Type msDS-ShadowPrincipal -Name "$ShadowSuffix$($ProdShadowPrincipal.SamAccount
Name)" -Path $ShadowPrincipalContainer -OtherAttributes @{'msDS-ShadowPrincipalSid'= $ProdShadowPrincipal.ObjectSID}
You can’t perform that action at this time.