Tag Archives: username

PowerShell: Active Directory User to SID and SID to User

I was recently asked to find the username associated with a particular Active Directory SID (technically I was given the RID). This is actually pretty easy in PowerShell, and quite intuitive using basic AD cmdlets. Get the user for a … Continue reading

Rate this:

Posted in PowerShell, Windows | Tagged , , , , , , , | 1 Comment

Send SMTP email with authentication from PowerShell

Email is a good way to send notifications from your PowerShell scripts, and it’s super easy. You just need an SMTP server, and use Send-MailMessage: You can even omit the -SmtpServer bit if you’ve previously set the $PSEmailServer preference variable. … Continue reading

Rate this:

Posted in PowerShell | Tagged , , , , , , , , , , , , , , , , , , | 5 Comments