Last active
June 21, 2018 12:56
-
-
Save a73xsh/91a2c3e3b71686781563ede7586d77cc to your computer and use it in GitHub Desktop.
Remove-ADTrustdomain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Domainlist = Import-Csv -Path DomainList.csv | |
foreach ($domain in $Domainlist){ | |
netdom trust lab.local /Domain:$($domain.name) /remove /Force /verbose | |
write-host "Trist domain $($domain.name) deleted" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment