RSiddaway

Start Jobs with &

You usually start background jobs using Start-Job. Now you can start jobs with &. As of PowerShell v6.0 putting & at the end of a pipeline...

read more

Get-Date -UFormat

The Get-Date -UFormat parameter formats the date using Unix format. The full list of format specifiers are in the Notes section of the Get-Date help...

read more

Exclusive OR

PowerShell has a number of logical operators - -  -and, –or, –not (or !). One I’ve really thought about is the exclusive OR operator –xor. With...

read more

Useful constants

PowerShell provides easy access to some useful constants. I often see people calculating these values rather than using the constants. PowerShell...

read more

Stable sort

In Windows PowerShell if you do something like this: PS> (1..20 | Sort-Object -Property {$_ % 3}) -join ' ' 9 6 12 15 3 18 19 16 13 10 4...

read more

OpenSSH installation

OpenSSH installation has got a lot simpler in Windows 10 1809; Windows Server 2019 and Windows Server 1809. OpenSSH is available as an optional...

read more

WSL improvements

Windows Subsystem for Linux - WSL improvements have been recently announced - https://devblogs.microsoft.com/commandline/ WSL 2 is on the way which...

read more

PowerShell SSH

PowerShell SSH support is available by default in PowerShell v6.0 and later. The big thing for PowerShell v6.0 was SSH based remoting. On Windows 10...

read more

Count

Count is a property on arrays PS> $x = 1..10 PS> $x.Count 10 The same information is available through Length (which is the property in the...

read more

Opposing Automation

Opposing Automation – no I don’t mean that you should oppose it. The sad fact is that there are very many administrators opposed to automation....

read more

File rename

File rename is a topic that seems to keep recurring. The simple answer is that you use Rename-Item PS> Rename-Item -Path C:testNewoutdata01.txt...

read more

CIM_Component class

I saw a question about the CIM_Component class and wondered what it was. So I tried it PS> Get-CimInstance -Namespace rootCIMV2 -ClassName...

read more

File times

There are three pairs of file times that are available on files on Windows PS> Get-ChildItem -Path C:testNewoutdata01.txt | select *time*...

read more