Author Archives: richardsiddaway

Splitting into pairs

During my session on scriptblocks at Summit 2018 I showed how to split a string into pairs of values Start with this string PS> $str = ‘Jack,Jill,Bill,Ben,Eric,Ernie,Cagney,Lacey’ You want the string split in the commas – but every other comma … Continue reading

Posted in Powershell | Leave a comment

Summit 2018 sessions

The code and slides from my Summit 2018 sessions can be found at https://github.com/RichardSiddaway/Summit2018TroubleShootingRemoting and https://github.com/RichardSiddaway/Summit2018ScriptBlocksDecoded

Posted in Powershell, Summit | Leave a comment

PowerShell functionality

PowerShell functionality – in the form of modules – comes from a number of different sources. These are: Powershell itself including the Microsoft.PowerShell.* modules and CIM cmdlets Windows Team – this includes the modules such as NetAdapter, NetTCPIP, Storage that … Continue reading

Posted in Powershell | Leave a comment

Hyper-V book

The Month of Lunches Hyper-V book I was working on was cancelled by the publisher. The good news is that it’s most likely going to be resurrected with another publisher and will hopefully be available later this year. More to … Continue reading

Posted in Hyper-V | Leave a comment

WMI and CIM accelerators

In PowerShell an accelerator is a shortcut to a .NET type. The WMI accelerators have been around since PowerShell v1. The WMI accelerators were heavily used in v1 fill some of the gaps in cmdlet coverage. The CIM accelerators appeared … Continue reading

Posted in PowerShell and CIM, PowerShell and WMI | Leave a comment

PowerShell parameter sets

PowerShell parameter sets allow you to control which parameters can be used together. If a parameter isn’t in the parameter set you’re trying to use you’ll get an error message. PS> Get-VM -Name XYZ -id (New-Guid) Get-VM : Parameter set … Continue reading

Posted in Powershell | Leave a comment

PowerShell version

Discovering the PowerShell version you’re using can be an interesting task. The automatic variable $PSVersionTable was introduced in PowerShell v2.  On my Windows 10 version 1803 machine for Windows PowerShell I get PS> $PSVersionTable Name                           Value —-                           —– PSVersion                      5.1.17134.48 … Continue reading

Posted in PowerShell v5, PowerShell v6 | Leave a comment