PowerShell SnippetRace 01-04/2025

7.5, automatic variables, Azure, logging

Events

  • The PowerShell Engineering Team joins the
    PowerShell Usergroup Austria Quarterly Februar 11th 2025 17:00 CET.
    AIShell, PowerShell 7.5, and PlatyPS will be the topics:
    Register here – for an hour of news from the world of your your favorite one-liner.
  • ExpertsLive Austria Conference 2025 – June 18th 2025. Watch www.expertslive.at for more.

Snippets

PowerShell 7.5 new features

The new version is on its way and currently GA (heard the poem inside ;-)). Mike Kanakos read the documentation and summarized the new features like XML handling, updates on PSResourceget, Array-Performance. and improvements in .NET9. Prepare yourself with knowledge about the benefits hitting you with 7.5 !

Automatic variables

PowerShell does a lot behind the scenes, that works completely automatic UNTIL you want to change this behavior. Thats the time to start looking at automatic variables (i.e. $maximumHistoryCount or $lastexitcode). Read Adam Bertrams Blog on Automatic Variables and look behind the curtain.

Convert Azure Premium SSD v2 Disks with PowerShell

This is a typical „i dived deep into something and explain it in a blog“ writing. If you are in the situation to convert SSD´s in Azure, read Bakis article on the details.

Build your own logging function

To know whats happened in a script is especially useful if something went wrong. To log activities in PowerShell you can use the consoles output, verbose and debug logging or log to a file. File-logging needs to be handled by the developer. Read Adam Bertrams Article on his simple Write-Log to start yur own logging journey.

Happy start into the year !

R.

Foto von Etienne Girardet auf Unsplash

Leave a Reply