PowerShell SnippetRace 44/45-2022

PSScriptAnalyzer, OpenSSH, curl, -ne, Azure Automation

Events

  • PowerShell Workshop (MS-Graph, PowerShellGet, news around PS), 9. November 2022 in Linz. See more info (address and teams link) here. Workshop will be held in GERMAN language.

Snippets

PSScriptAnalyzer 1.21.0 released

It runs in the background, and is pretty helpful to avoid wrong or bad code. PSScriptanalyser gets into its next round and comes with a few more features.

PowerShell 7.2 and Python 3.10 Support in Azure Automation

Azure Automation now supports runbooks in latest Runtime versions – PowerShell 7.2 and Python 3.10 in public preview. This enables creation and execution of runbooks for orchestration of management tasks. These new runtimes are currently supported only for Cloud jobs in five regions – West Central US, East US, South Africa North, North Europe, Australia Southeast. Microsoft is actively working on adding more regions to this list. If you want to test the functionality, create a subscrption in this region.

Learn more about PowerShell 7.2 runbooks and modules.
Learn more about Python 3.10 runbooks and packages.

Enabling PowerShell OpenSSH Remoting on Windows

Will it ever happen that PowerShell uses SSH vor Remoting and this is preconfigured by default ? Well, we never know, but until this time read Patrick Grünauers blog to configure it manually.

Little „curl“ guide instead of Invoke-WebRequest or Invoke-RestMethod

Whenever you have to deal with REST-API´s and you are NOT a PowerShell-guy, you may use curl already. curl is THE commandline interface for this kind of task. Learn the basics of curl and how to use it on Windows, so you may also learn from linux howtos.

Inequality in PowerShell

Stop – this is NOT a political blogpost. We are talking about the -ne (not equal) Operator in PowerShell. Even if this sound quite easy, there are some things to know, for an easier day-to-day life with PowerShell. Read Nicholas Xuan Nguyens post on -ne for more !

Cheers / Roman

Photo by fabio on Unsplash