Load PowerCLI into the PowerShell session as a module

Last year, VMware wrote about “PowerCLI 6.0 – Introducing PowerCLI Modules.” Although I’ve been using PowerCLI 6.0 since then, I missed the note from Alan Renouf that made it easy to load all of the PowerCLI functionality into a PowerShell session as a module instead of having to launch PowerCLI. Here was his tip/trick: 1 …

Running PowerShell as different user

If you want to launch PowerShell as a different user other than administrator, you won’t find a Run As menu to enter other credentials. After a bit of searching, I found that the following code works best in launching a new PowerShell windows as a different user. 1 2 3 4 5 6 7 8 …

Using PowerShell to change the UPN Suffix

For decades, it’s been a best practice to configure your corporate domain with a non-internet-rotatable .local domain (e.g. example.local instead of example.com). But in the modern everything-is-connected-to-the-internet age, this appears to be falling out of fashion. When “Preparing to provision users through directory synchronization to Office 365,” you’ll eventually realize that you’ll need to follow …

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] | …