Mail Merge Email via PowerShell’s Send-MailMessage

Here’s a script that will help you learn how to use PowerShell to conduct a mail merge via email. While I once used Microsoft Excel, Word, and Outlook to perform this task; PowerShell makes the process better. My script will even create an example CSV file that contains three columns: Email, First Name, Last Name. …

Exchange Get-MailboxStatistics with user Alias

Exchange has a nice PowerShell cmdlet called Get-MailboxStatistics, which by default, will output DisplayName, ItemCount, StorageLimitStatus, and LastLogonTime — like so: 1 2 3 4 5 [PS] C:\temp>Get-Mailbox -Identity [email protected] | Get-MailboxStatistics | Format-Table -AutoSize   DisplayName ItemCount StorageLimitStatus LastLogonTime ———– ——— —————— ————- Last, First 29665 NoChecking 2/4/2016 9:57:33 PM[PS] C:\temp>Get-Mailbox -Identity [email protected] | …

Using PowerShell to disable and move user and computer accounts

Here are two PowerShell scripts that I wrote and use to disable old Active Directory user or computer accounts. Typically I use the Microsoft Assessment and Planning Toolkit to have it identify “Days Since Last Activity” for both Active Directory Users and Devices. I then copy the list of Users or Devices I wish to …

Randomize Windows Updates via PowerShell and PSWindowsUpdate

If you manage a group of computers that have fallen behind on installing Windows Updates, this procedure and a few PowerShell tools may help you less-disruptively install a just a few randomized updates at a time when computers are idle. Objective Many of the computers in my environment are used 24/7 by rotating shifts of …

Use PowerCLI Set-HardDisk and Invoke-VMScript to increase the size of many virtual machine hard drives

Today I decided that I wanted to increase the C: volume of 20 VMware Horizon View parent virtual machines (the source for 1,000s of linked-clone virtual desktops) from 40 GB to 60 GB. The normal/painful way to do this would be: vSphere > select the virtual machine > Edit Settings > change Hard Disk 1 …