The “Hey, Scripting Guys!” blog has been retired. There are many useful posts in this blog, so we keep the blog here for historical reference. However, some information might be very outdated and many of the links might not work anymore.
New PowerShell content is being posted to the PowerShell Community blog where members of the community can create posts by submitting content in the GitHub repository.
Scripting Blog [archived]
Formerly known as the "Hey, Scripting Guy!" blog
Latest posts
PSScriptAnalyzer deep dive – Part 2 of 4
Summary: Thomas Rayner, Microsoft Cloud and Datacenter Management MVP, shows how to suppress, include, and exclude PSScriptAnalyzer rules. Hello! I’m Thomas Rayner, a 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 presenting a four-part series about how to use PSScriptAnalyzer. Part 1 – Getting started with PSScriptAnalyzer Part 2 – Suppressing, including, excluding rules Part 3 - Wrapping PSScriptAnalyzer with Pester to get formatted results Part 4 – Writing cu...
PowerTip: Find all the Azure Automation jobs that will run in the next two days
Summary: Cloud and Datacenter Management MVP, Thomas Rayner, shows how to find all the Azure Automation jobs that will run in the next two days. Is there a way to find all the Azure Automation jobs that will run in the next two days? Use the cmdlet, and check out the attribute. Here is an example:
PSScriptAnalyzer deep dive – Part 1 of 4
Summary: Thomas Rayner, Microsoft Cloud and Datacenter Management MVP, shows the basics about how to use PSScriptAnalyzer. Hello! I’m Thomas Rayner, a 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 presenting a four-part series about how to use PSScriptAnalyzer. Part 1 – Getting started with PSScriptAnalyzer Part 2 – Suppressing, including, excluding rules Part 3 - Wrapping PSScriptAnalyzer with Pester to get formatted results Part 4 – Writing custom rules This...
Nearly everything has changed for SQL Server PowerShell
2016 was the best year in SQL PowerShell history! I guess I should have mentioned that here sooner. Wired® Magazine recently said that Microsoft SQL Server was the surprise hit of the year. The primary cited reason is the SQL Server port to Linux, but there are several other reasons to be really excited about SQL Server and SQL Server PowerShell is one of them. Independent, frequent releases of SSMS Thanks to the new release cycle of SQL Server Management Studio (SSMS), which comes out nearly every month, the SQL Tools team could deliver even more without making us wait until the next major release of SQL Server...
View passwords of wireless profiles without using netsh.exe
Ever since the GUI lost the ability to view the password of a wireless profile, I wanted to provide this functionality in PowerShell. A search of the Internet for how to view the password of a Wi-Fi profile returns numerous examples of how to use netsh.exe to accomplish this. I wrote a previous blog post about how to view Wi-Fi profiles, and the method I used returned objects, but still relied on netsh.exe. I had some free time, and I wanted to learn about p/invoke, so I wrote a PowerShell module to do this. Let’s look at how to do this without netsh. If there isn’t a cmdlet or method in .NET to get what you wan...
Visual Studio Code editing features for PowerShell development – Part 2
Summary: Editing features for Visual Studio Code that use the PowerShell extension. Welcome to Part 2 about editing features of Visual Studio Code. Everything that we examined in Part 1 of this series is about Visual Studio Code editing features that are available without the PowerShell extension installed! They apply to your markdown, JSON, XML, and YAML files. Now, let’s look at additional editing features the PowerShell extension provides. IntelliSense With the PowerShell extension, you get IntelliSense for commands, command parameters, .NET type names, member names, and method parameter information as shown...
Visual Studio Code editing features for PowerShell development – Part 1
Summary: The editing features of Visual Studio Code come in handy as you develop your PowerShell scripts. Note: This post includes animated gifs. For best results, view the post in Internet Explorer or Microsoft Edge. In the previous blog post, we explained how to get started with PowerShell development in Visual Studio Code. If you don’t have Visual Studio Code configured with the PowerShell extension, read that blog post first to get caught up. Since that blog post, there have been two important updates. First, Visual Studio Code has been updated to 1.8. One significant new feature in Visual Studio Code 1.8 is ...
SharePoint Online cmdlets to help your migration
Summary: Use these PowerShell cmdlets to migrate to SharePoint Online. Today’s post is from Christopher Weaver, who is a Microsoft Premier Field Engineer (PFE) and focuses on SharePoint and Office 365 solutions for large enterprise Premier customers. He has been doing PowerShell and SharePoint with Microsoft for nine years. In his spare time, he enjoys backpacking, hiking, kite surfing, and spending time with his kids and dog. You can follow him on his blog at https://blogs.technet.microsoft.com/christwe/. As we prepare our SharePoint Online environment for migration, we will need to be able to manage site coll...
Where[-Object] clauses for people who use SQL Server
Summary: Learn about the power of the Where[-Object] cmdlet in PowerShell. Can I do a WHERE clause with an IN, in PowerShell? Yes! Today’s post is from Aaron Nelson ( blog | twitter ), who is a Microsoft MVP for SQL Server (Data Platform), leads the PowerShell Virtual Chapters of PASS, volunteers for the local PASS Chapter AtlantaMDF, and helps organize SQL Saturday events in Atlanta. The PowerShell Virtual Chapter of PASS hosts monthly sessions on SQL Server + PowerShell, and you can find the recordings of those sessions on their YouTube channel. is an extremely important cmdlet. Those of us who use SQL are...