Category Archives: Powershell

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

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 problem reporting

There seems to be a lot of confusion about PowerShell problem reporting. The difference between Windows PowerShell (the one you find pre-installed on Windows machines) current version v5.1 and PowerShell (the open source project) current version v6.0 isn’t really understood … Continue reading

Posted in Powershell | 1 Comment

PowerShell Summit 2018 videos

The PowerShell Summit 2018 videos are available at https://www.youtube.com/watch?v=sN7xw_jq_64&list=PLfeA8kIs7CocGXuezOoYtLRdnK9S_Mq3e Enjoy

Posted in Powershell, Summit | 2 Comments

-Contains or -In

PowerShell has two operators that do very similar jobs –contains and –in. So which should you use –contains or –in. From the help file. -Contains: Tells whether a collection of reference values includes a single test value. -In: Tells whether … Continue reading

Posted in Powershell | 1 Comment