Hier ein Beispiel Script
# Active Directory-Modul importieren Import-Module ActiveDirectory # Informationen über den neuen Trust festlegen $sourceDomain = "EigeneDomäne.local" $targetDomain = "FremdeDomäne.local" $trustPassword = ConvertTo-SecureString -String "TrustPasswort" -AsPlainText -Force $trustDirection = "Bidirectional" $trustType = "Forest" # Trust erstellen New-ADTrust -SourceName $sourceDomain -TargetName $targetDomain -TrustPassword $trustPassword -TrustDirection $trustDirection -TrustType $trustType