I have written a script to create an Active Directory Trust. The trust creation works fine, but when I attempt to set the selective authentication it does not work.
$SourceContext = New-Object System.DirectoryServices.ActiveDirectory.DirectoryContext("Forest","mydomain.com") $SourceDomainOBJ = [System.DirectoryServices.ActiveDirectory.Forest]::GetForest($SourceContext) $SourceDomainOBJ.SetSelectiveAuthenticationStatus("otherdomain.com", $false) $SourceDomainOBJ.GetSelectiveAuthenticationStatus("otherdomain.com")
The code executes and returns what is expected, but if you open he actual trusts from Active Directory Domains and Trusts it hasn't made the change.
Any ideas why it wouldn't be applying?