Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Powershell - Forest.SetSelectiveAuthenticationStatus Method - Not working

$
0
0

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?


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>