Author: Mike F Robbins

Mike F Robbins is a Microsoft MVP on Windows PowerShell and a SAPIEN Technologies MVP. He is a co-author of Windows PowerShell TFM 4th Edition and is a contributing author of a chapter in the PowerShell Deep Dives book. Mike has written guest blog articles for the Hey, Scripting Guy! Blog, PowerShell Magazine, and PowerShell.org. He is the winner of the advanced category in the 2013 PowerShell Scripting Games. Mike is also the leader and co-founder of the Mississippi PowerShell User Group. He blogs at mikefrobbins.com and can be found on twitter @mikefrobbins.

The PowerShell Iron Scripter: My solution to prequel puzzle 3

I've been working through the Iron Scripter 2018 prequel puzzles which can be found on PowerShell.org's website. In puzzle 3, you're asked to create a "reusable PowerShell artifact". To me, that almost always means a PowerShell function. One requirement is to pull information from the PowerShell.org RSS feed. Invoke-RestMethod which was introduced in PowerShell version 3.0 is the easiest way to accomplish that task. You're also asked to display the returned information in a way that allows the Read more [...]

Help in PowerShell Core is independent of help in Windows PowerShell

You've decided to install PowerShell Core on your Windows system. First of all, keep in mind that PowerShell Core version 6.0 is not an upgrade or replacement to Windows PowerShell version 5.1. It installs side by side on Windows systems. Being aware of this makes what is shown in this blog article make more sense, otherwise it can be confusing. Based on the response to a tweet of mine from Don Jones, it appears that I’m not the only one who thought PowerShell Core should have been version 1.0 Read more [...]

The PowerShell Iron Scripter: My solution to prequel puzzle 2

As I mentioned in my previous blog article, each week leading up to the PowerShell + DevOps Global Summit 2018, PowerShell.org will be posting an iron scripter prequel puzzle on their website. As their website states, think of the iron scripter as the successor to the scripting games. If you haven't done so already, I recommend reading my solution to the Iron Scripter prequel puzzle 1 because some things are glossed over in this blog article that were covered in detail in that previous one. Prequel Read more [...]

The PowerShell Iron Scripter: My solution to prequel puzzle 1

Each week leading up to the PowerShell + DevOps Global Summit 2018, PowerShell.org will be posting an iron scripter prequel puzzle on their website. As their website states, think of the iron scripter as the successor to the scripting games. I've taken a look at the different factions and it was a difficult choice for me to choose between the Daybreak and Flawless faction. While I try to write code that's flawless, perfection is in the eye of the beholder and it's also a never-ending moving target. Read more [...]

Use PowerShell to create a bootable USB drive from a Windows 10 or Windows Server 2016 ISO

It seems as if every time I need to reload a physical system, I'm searching the Internet to find a way to create a bootable USB drive from a Windows 10 or Windows Server 2016 ISO. I always seem to find tutorials that are using a process that's almost 20 years old. They have me using the diskpart command line utility. Diskpart which initially shipped with Windows 2000, reminds me way too much of its predecessor, the fdisk command line utility. The PowerShell commands in this blog article are written Read more [...]

PowerShell Compare-Object doesn’t handle null values

I thought I'd run into a bug with the Compare-Object cmdlet in PowerShell version 5.1 earlier today. Compare-Object : Cannot bind argument to parameter 'ReferenceObject' because it is null. At line:1 char:33 + Compare-Object -ReferenceObject $DriveLetters -DifferenceObject $Driv ... + ~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Compare-Object], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.CompareObjectCommand Running Read more [...]

PowerShell 101: The No-Nonsense Beginner’s Guide to PowerShell is the featured book on Leanpub

Learning PowerShell seems to be a hot topic for the new year. My PowerShell 101 book was the number one bestseller on Leanpub earlier this week and now it's the featured book on their website. Going to the homepage on their website, shows the book is indeed the currently featured one. I would also like to thank Tommy Maynard for the technical editing he performed on the book. If you're not following him on Twitter or reading the articles on his blog site, you should be. µ Read more [...]

Using PowerShell to Check Remote Windows Systems for CVE-2017-5754 (Meltdown) and CVE-2017-5715 (Spectre)

The Microsoft Security Response Center has released a PowerShell module named SpeculationControl that can be used to check for the CVE-2017-5754 (Meltdown) and CVE-2017-5715 (Spectre) vulnerabilities. The SpeculationControl module can be installed from the PowerShell Gallery with Install-Module which is part of the PowerShellGet module that ships natively with PowerShell version 5.0, but can be installed on PowerShell version 3.0 and higher. Running Read more [...]

Learn to write award winning PowerShell functions at SQL Saturday Nashville on January 13th

Interested in learning how to write PowerShell functions that follow industry standard best practices? Well, you're in luck. I'll be presenting a session on "Writing award winning PowerShell functions and script modules" at SQL Saturday #698 in Nashville, Tennessee on January 13th. In addition to my session, there are a number of PowerShell sessions throughout the day so be sure to check the schedule. Here's a little about what you can expect from my presentation: "Transitioning from Read more [...]

PowerShell 101: The No-Nonsense Beginner’s Guide to PowerShell is the number one bestseller on Leanpub

I would like to thank everyone who helped make my new book, PowerShell 101: The No-Nonsense Beginner’s Guide to PowerShell, the number one bestseller on Leanpub.com. As shown in the previous image, PowerShell 101 is the number one top book on their homepage. It's also the number one bestseller on their site in the last week: And the book with the most copies sold in the last week: Today is the last day to purchase the book using the special year's end promotion, but as always with Read more [...]

My new PowerShell book is on sale for 99-cents until the end of the year!

On Christmas day, I announced that my new book, PowerShell 101: The No-Nonsense Beginner’s Guide to PowerShell had been completed. I gave away 10 copies of it along with placing it on sale for 99-cents (reduced from the suggested price of $15.99) until the end of the year. Time is running out, but there's still time to grab a copy at this price. Use this URL to access the 99-cent sale. As always, with Leanpub.com, you can pay more. All of the proceeds from this book help keep this Read more [...]

Merry Christmas! I’m giving away 10 free copies of my PowerShell 101 book

Earlier this year, I announced that I would be writing a new book "PowerShell 101: The No-Nonsense Beginner’s Guide to PowerShell" that would be completed before the end of the year and published on Leanpub.com. As I wrote the chapters, I incremented the percentage complete on the book's webpage. A few days ago, I made a few final corrections and marked the book as being 100% complete. One thing that I'm a big believer in is do what you say you're going to do. I wanted to make sure the book Read more [...]

Generate a Secret Santa List with PowerShell

It's supposed to be the most wonderful time of the year and while you might buy multiple Christmas gifts for everyone in your immediate family, often times buying for everyone in your extended family or for all of your co-workers is cost prohibitive. I originally started out with a simple idea to create a PowerShell script to take a list of names and generate a second random list of names based off of the first one while making sure the corresponding name on the second list doesn't match the first Read more [...]

Retrieve Basic Operating System Information with PowerShell

PowerShell version 5.1 added a new cmdlet named Get-ComputerInfo which retrieves lots of information from the local computer. It can be wrapped inside of the PowerShell remoting Invoke-Command cmdlet to retrieve that same information from remote computers. My biggest complaint with Get-ComputerInfo is that it takes forever to return the information and then when it does finally complete, it's missing values for most of its properties. Also, if you're going to wrap it inside of Invoke-Command, Read more [...]

Determine the Start Time of a Windows Service with PowerShell

Recently, I was asked to setup a scheduled task or job to restart specific services on certain servers each night and while that's simple, how do you know for sure the services were indeed restarted? One way is to determine how long a service has been running or when they were started. The dilemma is the necessary information isn't available using the Get-Service cmdlet or with CIM or WMI using the Get-CimInstance or Get-WmiObject cmdlets with the Win32_Service class. The good news is that every Read more [...]