Tag Archives: convertto-securestring

Send email via Yahoo with PowerShell

Quick reference for sending email via a Yahoo! mail account and their SMTP servers from within a PowerShell script. You’ll need the Yahoo SMTP server details, which require you to use a specific port (587 – I couldn’t get 465 … Continue reading

Rate this:

Posted in PowerShell, Security | 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

PowerShell: Add users to Active Directory

Quickie script to add a load of users to Active Directory. This was to generate a set of test users, so the account settings are rather scarce. You have to convert the password text string┬áto data type System.Security.SecureString, which I’m … Continue reading

Rate this:

Posted in PowerShell | Tagged , , , , , , , , , , , , , | Leave a comment