Monthly Archives: February 2018


If you want to find the name of the local computer you use $env:COMPUTERNAME. Except that doesn’t exist in Linux PowerShell v6 – you have to use $env:HOSTNAME PowerShell 1 Consistency 0 I can live with having $env:HOSTNAME because I … Continue reading

Posted in PowerShell v6 | Leave a comment

PowerShell for loop

PowerShell has a number of looping mechanisms – do-while; do-until; foreach; while and for loops. In this post I’ll show you how to use the PowerShell for loop. A for loop iterates a predefined  number 0f times. A basic for … Continue reading

Posted in Powershell Basics | Leave a comment

PowerShell v6 and PowerShell Direct

Not seen this reported anywhere so thought I post. PowerShell v6 went to GA in January 2018. PowerShell Direct is a feature of Windows 10/Windows Server 2016. By accident I found that PowerShell v6 and PowerShell Direct work together. PowerShell … Continue reading

Posted in Hyper-V, PowerShell v6 | Leave a comment

Putting on the style

PowerShell is all about getting things done but how you do things can be as important as what you do. I’ll explain what I mean so you be able to be putting on the style. While PowerShell is used by … Continue reading

Posted in Philosophy, Powershell | Leave a comment

Dynamic parameters

PowerShell has always been an extensible language meaning that you can add things on, change things and even remove things if required. One way that this extensibility surfaces is dynamic parameters. A dynamic parameter is a parameter that is available … Continue reading

Posted in Powershell | Leave a comment

CIM_ or Win32_

If you dig into the classes available on a Windows machine you’ll see a mixture of prefixes – namely CIM_ and Win32_ used for the classes. So which should you use CIM_ or Win32_ Lets start by seeing whats available: … Continue reading

Posted in PowerShell and CIM | Leave a comment