PowerShell: Demote Domain Controllers
$computername=$env:computername $localAdminPassword='PASSWORD' function demoteDc($computername=$env:computername,$localAdminPassword){ $erroractionpreference=stop $encryptedPass=convertto-securestring $localAdminPassword -asplaintext -force Import-Module ActiveDirectory $thisComputer=$env:computername $fsmoRoles=Get-ADDomainController -Filter *|Select-Object…
0 Comments