Category Archives: PowerShell v5

Long file paths

Long file paths – greater than 260 characters – have been a pain to deal with in Windows. There is an argument that you should avoid file paths of that length but sometimes you don’t have any choice – when … Continue reading

Posted in File system, PowerShell v5 | 1 Comment

NTFSsecurity module

Just came across the NTFSsecurity module. Its available on the PowerShell gallery or from https://github.com/raandree/NTFSSecurity. The *-Acl cmdlets have been around since Windows PowerShell v1 but aren’t easy to use and don’t cover all our needs. This module contains a … Continue reading

Posted in PowerShell v5, Security | 2 Comments

Group-Object change in PowerShell v6.1

There’s a subtle Group-Object change in PowerShell v6.1. In PowerShell v5.1 if you do this: $ts = ‘ffrluoluntlvxutxbdvbktgyyvsvcrkxoyfotzkzogcwuwycmnhuedk’ $ts.ToCharArray() | group You get this: Count Name                      Group —– —-                      —–     3 f                         {f, f, f}     2 r                         {r, … Continue reading

Posted in PowerShell v5, PowerShell v6 | Leave a comment

Finding the minimum and maximum values

Finding the minimum and maximum values in a set of numbers is ridiculously easy with PowerShell. I’ve created a function in line with the other techniques I’ve shown but in reality could be be done equally well as a single … Continue reading

Posted in Powershell, PowerShell v5, PowerShell v6 | Leave a comment

PowerShell new line

A PowerShell new line can be generated using `n. It’s one of a series of special characters recognised by PowerShell. The full list of Windows PowerShell v5.1 special characters is: `0    Null `a    Alert `b    Backspace `f    Form feed `n    … Continue reading

Posted in Powershell, PowerShell v5, PowerShell v6 | Leave a comment

Update-Help difference

Between Windows PowerShell v5.1 and PowerShell v6.x I’ve noticed an Update-Help difference. In Windows PowerShell v5.1 I can just do this: Update-Help  -Force from an elevated prompt. In PowerShell v6.0 and V6.1 previews I have to give the UI culture … Continue reading

Posted in PowerShell v5, PowerShell v6 | 2 Comments

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