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.

PowerShell + DevOps Global Summit 2020 – Call for Speakers

The call for speakers for the 2020 PowerShell + DevOps Global Summit is open until October 1st. I can definitely speak from experience when I say that this is the best PowerShell conference in North America if you're interested in PowerShell and networking with other like-minded people. I've attended every year since its inception and have spoken at it about half as many times. While I'm in no way affiliated with the organizers, based on their site, they're not only looking for deep-dive content Read more [...]

PowerShell Productivity Hacks: How I use Get-Command

If you've been using PowerShell for very long at all, then you should already be familiar with Get-Command and Get-Help. While I like to say that Get-Command is for finding commands and Get-Help is for learning how to use those commands once you've found them, there is overlap between these two commands depending on how you use them. I believe in following the best practice of not using aliases or positional parameters in any code that I save or share with others, but in this blog article, I'm Read more [...]

Research Triangle PowerShell Saturday – September 21st

The Research Triangle PowerShell Saturday is Saturday, September 21st, 2019 in Raleigh, North Carolina. There's also a 6-hour security session on Sunday, September 22nd, 2019. Tickets can be purchased for just one of the days or both, but seating is limited for the Sunday post-con so don't wait until the last minute! Based on the schedule, this event should be almost like a mini PowerShell + DevOps Global Summit which makes it well worth the price of admission. There are three different all-day Read more [...]

Parallel and ThrottleLimit Parameters added to ForEach-Object in PowerShell 7 Preview 3

Preview 3 of PowerShell 7 was released yesterday. It can be downloaded from the PowerShell repository on GitHub. Be sure to choose the preview version for the appropriate operating system. It should go without saying that anything with preview in its name should NOT be installed on a mission-critical production system. The examples shown in this blog article are being run on a system running Windows 10 (x64). Your mileage may vary with other operating systems and/or versions. One Read more [...]

Presenting 2 Sessions in the All Day Dedicated PowerShell Track at SQL Saturday Baton Rouge this Saturday August 17th, 2019

I’ll be presenting “PowerShell + SQL Server = Better Together” and "Writing Award Winning PowerShell Functions and Script Modules" at SQL Saturday #867 in Baton Rouge Louisiana this Saturday, August 17th. The event is free, although you need to register. Here’s a little information about what you can expect from my sessions: PowerShell + SQL Server = Better Together As a SQL Server professional, are you able to make a rhyme or reason to this thing called PowerShell? Need to accomplish Read more [...]

PowerShell Function to Find Parameter Aliases

While sitting through Jeff Hicks' Advanced PowerShell Scripting Workshop at PowerShell on the River in Chattanooga today, he mentioned there being a "Cn" alias for the ComputerName parameter of commands in PowerShell. I've previously written a one-liner to find parameter aliases and at one time Microsoft had starting adding parameter aliases to the help for commands as referenced in that same blog article, but it appears that they've discontinued adding them to the help and removed the ones they Read more [...]

Where are Untitled Tabs in VSCode Saved on a Windows System?

Ever wonder how VSCode (Visual Studio Code) maintains those untitled tabs between sessions? They're stored as files underneath your user's profile in appdata on Windows based systems as shown in the following example. The previous command could be piped to Get-Content to view the contents of all of code in the open untitled tabs of VSCode. You could also use Select-String to find something specific. I can see that three of my open tabs contain 'mikefrobbins'. Concerned Read more [...]

The No-Nonsense Beginner’s Guide to PowerShell at PowerShell on the River in Chattanooga, TN on Saturday August 10th

I’ll be presenting "PowerShell 101: The No-Nonsense Beginner’s Guide to PowerShell" at PowerShell on the River in Chattanooga Tennessee this Saturday, August 10th. The event itself is a mini-conference with all day sessions on Friday, August 9th and then numerous speakers presenting in three different tracks on Saturday, August 10th. Here’s a little information about what you can expect from my session: PowerShell 101: The No-Nonsense Beginner’s Guide to PowerShell Interested in Read more [...]

What’s in your PowerShell $PSDefaultParameterValues Preference Variable?

The $PSDefaultParameterValues preference variable, which was introduced in Windows PowerShell version 3.0, provides a mechanism for specifying default values for parameters. I thought I would share what I've added to mine and ask the community to share theirs. The first one in the list ('Out-Default:OutVariable' = 'LastResult') is one I picked up from Joel Bennett to store the results of the last command in a variable named $LastResult. Since then, I've seen Read more [...]

PowerShell + SQL Server = Better Together Presentation at SQL Saturday Birmingham on Saturday, July 27th

I'll be presenting "PowerShell + SQL Server = Better Together" at SQL Saturday #899 in Birmingham Alabama this Saturday, July 27th. The event is free, although you need to register (some SQL Saturday's charge a small optional fee for lunch). Here’s a little information about what you can expect from my session: PowerShell + SQL Server = Better Together As a SQL Server professional, are you able to make a rhyme or reason to this thing called PowerShell? Need to accomplish something? Do you Read more [...]

Install PowerShell 7 with Jeff Hicks’ PSReleaseTools Module

PowerShell version 7 is currently in preview and while it can be installed on Windows, Linux, and macOS, the examples shown in this blog article focus on installing it on a Windows based system, specifically Windows 10 using Windows PowerShell version 5 or higher which ships by default with Windows 10. Your mileage may vary with other operating systems, other versions of Windows, and/or other versions of Windows PowerShell. The easiest way that I've found to install the preview of PowerShell version Read more [...]

Import a Hyper-V Virtual Machine with PowerShell

I recently ran into a problem where an exported VM from Windows Server 2016 running Hyper-V wasn't able to be imported on Windows Server 2019 running Hyper-V. When attempting to perform the import, the GUI stated "No virtual machines files found" as shown in the following image. This problem may have been due to using Hyper-V manager on a remote system running Windows Server 2012 R2, although the same system was used for the export. Since the Hyper-V servers themselves were installed with Read more [...]

Determine the Generation of a Hyper-V VM with PowerShell

Ever need to determine what generation all of the virtual machines are on your Hyper-V servers? This is simple using the Get-VM command that installs as part of the Hyper-V module for Windows PowerShell. While the previous command will work on both clients and servers, the following command could also be used on a Windows server. The generation of the VM is one of the properties from the results of Get-VM. The Read more [...]

Mitigating BlueKeep with PowerShell

When it comes to security, most people normally approach it at one extreme or the other. Some people do nothing and don't worry about it. All I can say for those folks is good luck with that and I hope your resume is updated. Others go into full blown panic mode, especially those who don't take the time to understand vulnerabilities. Many security folks and articles on the Internet don't help much either because they often blow things out of proportion which puts many of the people in the second Read more [...]

Find an Application that runs as a Service in your Environment with PowerShell

I recently worked with a vendor to remove an old application that was no longer being used from a server in one of my customer's environments. While many applications may be left to die on the server long after they're needed, this particular one transmitted data to a partner company so it definitely needed to be removed. The problem is the application was so old that no one knew which server of the hundreds of servers it was running on. The partner company was able to provide the display name Read more [...]

Video: Finding Performance Bottlenecks of Windows Based Systems with PowerShell

Earlier this month, I presented a session on Finding Performance Bottlenecks with PowerShell at the PowerShell + DevOps Global Summit 2019 in Bellevue, Washington. The session seemed to be well received by the audience based on the feedback that I received from the attendees. The video from this presentation is now available https://www.youtube.com/watch?v=zaHZOffoZyE The code and slides used during the demonstration can be found in my presentations repository on GitHub. µ Read more [...]