Monday, December 8, 2014

Powershell: SID to Username

#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

Sunday, December 7, 2014

DHCP Address Negotiation Process


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"