#Returns a username based on a SID
#Author: Ryan Nemeth
#Date: 12/2/2014
$SID = read-host "Please enter the SID: "
$object = New-Object System.Security.Principal.SecurityIdentifier($SID)
$User = $object.Translate( [System.Security.Principal.NTAccount])
write-host "The user is: " $User.Value
Monday, December 8, 2014
Sunday, December 7, 2014
Unlock a Domain User from CMD Line
To unlock a domain user from the command line, use this command:
net user <username> /domain /active:yes
This can also be done using Powershell:
Unlock-ADAccount -identity "CN=John,OU=myUsers,DC=myDomain,DC=local"
net user <username> /domain /active:yes
This can also be done using Powershell:
Unlock-ADAccount -identity "CN=John,OU=myUsers,DC=myDomain,DC=local"
Subscribe to:
Posts (Atom)