Posted in
Hosting & IIS7,
Windows Powershell,
Windows Server |
No Comment | 4,669 views | 02/03/2010 12:26
It’s very easy to remove an Active Directory user with Powershell.
1
2
| $CustomerOU = [ADSI] "LDAP://$CustomerOU,$FQDN"
$RemoveADUser = $CustomerOU.Delete("User", "CN=$Username") |
$CustomerOU = [ADSI] "LDAP://$CustomerOU,$FQDN"
$RemoveADUser = $CustomerOU.Delete("User", "CN=$Username")
Again and again, please be sure about your LDAP path.