How to avoid reinventing the wheel in Azure Automation

Summary: Take advantage of existing scripts to create your own solutions.   Automation is the number one technical skill that IT needs to have to thrive in today’s quickly changing world. My recommendation is that anything you do for automation you should do in PowerShell, and you should use Azure Automation as your go-to automation…


PowerTip: Capture error code of a PowerShell session in Linux or macOS

Summary: Capture the status code of a PowerShell session in Linux or macOS. Could you show me how to run a PowerShell script in Linux or macOS and capture the status of whether that script succeeded or failed? No problem, my friend. Just run the PowerShell session, and start the script as in the following…


Open Source PowerShell – Part 1

Summary: Find and install the Open Source PowerShell software for Linux or Windows. I was reading up about a great new change in PowerShell. I heard that the newest version was Open Sourced on GitHub. Any chance you could give me a quick run-through to check it out? Honorary Scripting Guy, Sean Kearney, is here…


PowerTip: Know the difference between the .split() method and ‘-split’

Summary: Cloud and Datacenter Management MVP, Thomas Rayner, shows how to split a string by using a string instead of just a character. I am trying to split the string “this is my amazing string” on the pattern “my” by using “this is my amazing string”.split(“my”) but it’s giving me a bunch of garbled stuff…


PowerShell regex crash course – Part 5 of 5

Summary: Thomas Rayner, Microsoft Cloud and Datacenter Management MVP, shows the basics of working with regular expressions in PowerShell. Hello! I’m Thomas Rayner, a proud Cloud and Datacenter Management Microsoft MVP, filling in for The Scripting Guy! this week. You can find me on Twitter (@MrThomasRayner), or posting on my blog, workingsysadmin.com. This week, I’m…


Join the PowerShell tenth birthday celebration

SUMMARY: Microsoft Scripting Guy Ed Wilson announces November 14, 2016 as date for PowerShell 10th anniversary celebration Can you believe that PowerShell is nearly 10 years old (that is a long time in ‘internet time’)? On November 14, 2016 we will celebrate the occasion with a day-long event that will run from 8 in the…


PowerTip: How to use regular expressions to split a string without losing the character you split on

Summary: Cloud and Datacenter Management MVP, Thomas Rayner, shows how to split a string without losing the character you split on. I’m splitting this file name some file.txt into its name and extension by going “some file.txt” –split “.”. It’s giving me some file and txt, but I want to keep the dot and get…


PowerShell regex crash course – Part 4 of 5

Summary: Thomas Rayner, Microsoft Cloud and Datacenter Management MVP, shows the basics of working with regular expressions in PowerShell. Hello! I’m Thomas Rayner, a proud Cloud & Datacenter Management Microsoft MVP, filling in for The Scripting Guy! this week. You can find me on Twitter (@MrThomasRayner), or posting on my blog, workingsysadmin.com. This week, I’m…


Speed up remote PowerShell connection to Exchange

Summary: Speed up the connection to Exchange by importing only the cmdlets that you need. Is there a way to speed up the initial PowerShell connection to Exchange? Yes, of course! With a little modification to Import-PSSession, we can speed up the connection. Normally, you would connect to Exchange 2010/2013/2016 like this: $session = New-PSSession…