In the previous tips we investigated the UPnP.UPnPDeviceFinder and how to identify devices in your network. Let’s look at some use cases. Obviously,...
powertips
Exploring Plug&Play Devices (Part 3)
In the previous tip we illustrated how to use the UPnP.UPnPDeviceFinder to find devices on your network. You already learned how to enumerate all...
Exploring Plug&Play Devices (Part 2)
In the previous tip, we used the UPnP.UPnPDeviceFinder to discover smart devices hooked up to your network. Today, let’s take a closer look at...
Exploring Plug&Play Devices (Part 1)
You are probably living already in a connected smart home with many devices hooked up to your network. PowerShell can help you find your devices...
Listing Installed Updates (Part 2)
In the previous tip we looked at how to retrieve the list of currently installed updates from the Windows Update Client. This list can be polished,...
Listing Installed Updates (Part 1)
Get-Hotfix only lists operating-system-related hotfixes: Get-HotFix In reality, it is just a thin wrapper around a WMI query which produces...
Aborting the PowerShell Pipeline (Part 2: Manual Abort)
In the previous tip you learned how to abort the PowerShell pipeline once the required number of results is in, potentially saving a lot of time:...
Aborting the PowerShell Pipeline (Part 1: Select-Object)
Sometimes it can save a lot of time to manually abort a PowerShell pipeline. For example, if you don’t know exactly where a file is located...
Using a StopWatch to Measure Execution Times
There are situations when you’d like to know how long some code took to execute, for example to return statistics or compare code, and there are...
Foreach -parallel (Part 3: Mass Ping)
In PowerShell 7, there is a new parallel ForEach-Object that can execute code in parallel and speed up things considerably. The same technique can...
Foreach -parallel (Part 2: Windows PowerShell)
PowerShell 7 comes with a new ForEach-Object that supports parallel execution: 1..100 | ForEach-Object -ThrottleLimit 20 -Parallel { Start-Sleep...
Foreach -parallel (Part 1: PowerShell 7)
PowerShell 7 comes with a built-in parameter to run different tasks in parallel. Here is a simple example: 1..100 | ForEach-Object -ThrottleLimit 20...
-RepeatHeader Parameter
Here is a somewhat unknown parameter: -RepeatHeader! What does it do? Let’s assume you want to see results page by page (which only works in a...
PowerShell 7 Ternary Operator
With PowerShell 7, the language gets a new operator that created a lot of debate. Basically, you don’t have to use it, but users with a developer...
Get-ComputerInfo vs. systeminfo.exe (Part 2)
In PowerShell 5, a new cmdlet called Get-ComputerInfo was introduced which does what systeminfo.exe did in the past, yet Get-ComputerInfo is...
Get-ComputerInfo vs. systeminfo.exe (Part 1)
For a long time, the command-line utility systeminfo.exe provides a wealth of information about a computer and can return object-oriented results...
Safely Using WMI in PowerShell (Part 4)
In this mini-series, we are looking at the differences between Get-WmiObject and Get-CimInstance. Future PowerShell versions no longer support...
Safely Using WMI in PowerShell (Part 3)
In this mini-series, we are looking at the differences between Get-WmiObject and Get-CimInstance. Future PowerShell versions no longer support...
Safely Using WMI in PowerShell (Part 2)
In this mini-series, we are looking at the differences between Get-WmiObject and Get-CimInstance. Future PowerShell versions no longer support...
Safely Using WMI in PowerShell (Part 1)
WMI (Windows Management Instrumentation) is part of any Windows operating system and a common and widely used way of getting information about a...
Converting Word Documents from .doc to .docx (Part 2)
Converting old Word documents to the new .docx format can be a lot of work, and in part 1 you learned the basic steps to automate conversion....
Converting Word Documents from .doc to .docx (Part 1)
Converting old Word documents to the new .docx format can be a lot of work. Thanks to PowerShell, you can automate the conversion: function...
Exploring PowerShell Modules
Most PowerShell commands live in modules, and by adding new modules, you can add new commands to your PowerShell environment. To find out whether a...
WMI Explorer
WMI (Windows Management Instrumentation) is a great information source: you can find almost any information about your computer somewhere. The hard...