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

Test DNS servers

Had a recent comment about testing DNS servers which got me thinking how do I test DNS servers. I decided I wanted to get the DNS server address from the client, ping the DNS server to test network connectivity and … Continue reading

Posted in DNS | Leave a comment

Windows Terminal

Microsoft have released the first preview of the new Windows Terminal to the Windows store – https://devblogs.microsoft.com/commandline/windows-terminal-microsoft-store-preview-release/ Its currently only available for Windows 10 v18362 or later. The terminal is a replacement for the very elderly Windows console – used … Continue reading

Posted in Windows 10 | Leave a comment

PowerShell 7 roadmap

It was recently announced that the next version of PowerShell core will be 7.0 not 6.3. The PowerShell 7 roadmap is available at https://devblogs.microsoft.com/powershell/powershell-7-road-map/ The highlights are PowerShell 7 eventually replacing Windows PowerShell but I expect that’ll be 7.x rather … Continue reading

Posted in PowerShell 7 | Leave a comment