Monthly Archives: June 2019

PowerShell Space Invaders

Way back in 2007 (PowerShell v1 days) I wrote about PowerShell space Invaders.  I’ve just tried it in PowerShell v7 preview 1 and it seemed to work just fine including sound. It runs in PowerShell v6.2.1 but without sound – … Continue reading

Posted in Powershell | 1 Comment

Load format file in a module

Staying with the test-connection function I thought I’d show how to turn the function and format file into a module. This includes how to load the format file in a module. Create a folder TestConnection Copy the format file and … Continue reading

Posted in PowerShell 7, PowerShell v6 | Leave a comment

Test-Connection formatting

Last time I showed how to write a function that replaces the current PowerShell 6/7 Test-Connection. This time I’ll show you how to do the Test-Connection formatting. Using just the function you get something like this: PS>  test-connection -computername 127.0.0.1 … Continue reading

Posted in PowerShell 7, PowerShell v6 | Leave a comment

PowerShell 6/7 Test-Connection

The PowerShell 6/7 Test-Connection implementation as of PowerShell v6.2.1 and PowerShell v7.0 preview 1 is in my opinion a horrible example of how not to create output. the cmdlet shows  each ping and then wraps all of the results in … Continue reading

Posted in PowerShell 7, PowerShell v6 | 1 Comment

Quotes in CSVs

Up to and including PowerShell v6.2.x converting or exporting data to a csv has automatically put quotes round each field.  In PowerShell v7 you can control quotes in CSVs Using Get-Service | ConvertTo-Csv as an example. The current behaviour is … Continue reading

Posted in PowerShell 7 | Leave a comment

CDXML schema checks

PowerShell v3 introduced CDXML modules. Cmdlet Definition XML wraps a CIM class in XML to create a module. The methods of the CIM class can be used to generate additional cmdlets for the module. Many of the modules introduced with … Continue reading

Posted in PowerShell 7 | Leave a comment

PowerShell Line continuation

There are a number of ways to signal PowerShell line continuation in your code. probably the most common is to have a pipeline symbol at the end of the line: Get-Process | Sort-Object -Property CPU -Descending -Top 5 because there’s … Continue reading

Posted in PowerShell 7 | 4 Comments