PowerShell

Automating the world one-liner at a time…

PowerShell Logo
Using PSScriptAnalyzer to check PowerShell version compatibility

PSScriptAnalyzer version 1.18 was released recently, and ships with powerful new rules that can check PowerShell scripts for incompatibilities with other PowerShell versions and environments.
In this blog post, the first in a series, we’ll see how to use these new rules to check a script for problems running on PowerShell 3,

PowerShell Logo
PowerShell Core Release Improvements

For PowerShell Core, we basically had to build a new engineering system to build and release it. How we build it has evolved over time as we learn and our other teams have implemented features that make some tasks easier. We are finally at a state that we believe we can engineer a system that builds PowerShell Core for release with as little human interaction as necessary.

PowerShell Logo
The Next Release of PowerShell – PowerShell 7

Recently, the PowerShell Team shipped the Generally Available (GA) release of PowerShell Core 6.2. Since that release, we’ve already begun work on the next iteration!
We’re calling the next release PowerShell 7, the reasons for which will be explained in this blog post.

PowerShell Logo
DSC Resource Kit Release April 2019

We just released the DSC Resource Kit!
This release includes updates to 13 DSC resource modules. In the past 6 weeks, 87 pull requests have been merged and 90 issues have been closed, all thanks to our amazing community!
The modules updated in this release are:

CertificateDsc
ComputerManagementDsc
NetworkingDsc
OfficeOnlineServerDsc
SecurityPolicyDsc
SharePointDsc
SqlServerDsc
StorageDsc
xActiveDirectory
xPSDesiredStateConfiguration
xSMBShare
xWindowsUpdate
xWinEventLog

xWebAdministration is also in the pipeline for release as soon as it passes all tests.

PowerShell Logo
The PowerShell Gallery is now more Accessible

Over the past few months, the team has been working hard to make the PowerShell Gallery as accessible as possible. This blog details why it matters and what work has been done.
Why making the PowerShell Gallery more accessible was a priority
Accessible products change lives and allow everyone to be included in our product.

PowerShell Logo
LiveFyre commenting will no longer be available on the PowerShell Gallery

Commenting on the PowerShell Gallery is provided by LiveFyre–a third-party comment system. LiveFyre is no longer supported by Adobe and therefore we are unable to service issues as they arise. We have gotten reports of authentication failing for Twitter and Microsoft AAD and unfortunately we are unable to bring back those services.

PowerShell Logo
General Availability of PowerShell Core 6.2

We’re proud to announce that the latest version of PowerShell has been released!
This is the third minor supported release of PowerShell Core, the open-source edition of PowerShell that works on Linux, macOS, and Windows!
Thanks to everyone that made this release possible,

PowerShell Logo
PowerShell ScriptAnalyzer Version 1.18.0 Released

PSScriptAnalyzer (PSSA) 1.18.0 is now available on the PSGallery and brings a lot of improvements in the following areas:

Better compatibility analysis of commands, types and syntax across different platforms and versions of PowerShell
Better formatting and customization. New capabilities are:

Multi-line pipeline indentation styles
Cmdlet casing for better consistency and readability
Consistent whitespace inside braces and pipes

Custom rules can now be suppressed and preserve the RuleSuppressionID
Better DSC support by being able to understand different syntaxes of Import-DscResource
Better user experience by being able to pipe to Invoke-ScriptAnalyzer and added tab completion of the returned objects that are piped to the next pipeline
Better handling of parsing errors by emitting them as a diagnostic record with a new Severity type
Improved Performance: Expect it to be about twice as fast in most cases and even more when re-analyzing a file.

PowerShell Logo
Invoke-Sqlcmd is Now Available Supporting Cross-Platform

The official SqlServer module now includes a version of the Invoke-Sqlcmd cmdlet that runs in PSCore 6.2 and above. The version of the SqlServer module which contains this cmdlet is 21.1.18095-preview and is available in the PowerShell Gallery. In order to install this preview version of the module,

Powershell

PowerShell Logo
PowerShell Core Release Improvements

For PowerShell Core, we basically had to build a new engineering system to build and release it. How we build it has evolved over time as we learn and our other teams have implemented features that make some tasks easier. We are finally at a state that we believe we can engineer a system that builds PowerShell Core for release with as little human interaction as necessary.

PowerShell Logo
General Availability of PowerShell Core 6.2

We’re proud to announce that the latest version of PowerShell has been released!
This is the third minor supported release of PowerShell Core, the open-source edition of PowerShell that works on Linux, macOS, and Windows!
Thanks to everyone that made this release possible,

PowerShell Logo
Generating PowerShell Cmdlets from OpenAPI/Swagger with AutoRest

Announcing the availability of the beta version of our new PowerShell cmdlet generator for AutoRest.

PowerShell Gallery Home Page
New Look and Features for PowerShell Gallery

The PowerShell Gallery and PowerShellGet have just been updated to provide new features, performance improvements, and a new modern design.

NOTE: This post has important information for publishers in the “Accounts and publishing” section.

Uncategorized

PowerShell Logo
Using PSScriptAnalyzer to check PowerShell version compatibility

PSScriptAnalyzer version 1.18 was released recently, and ships with powerful new rules that can check PowerShell scripts for incompatibilities with other PowerShell versions and environments.
In this blog post, the first in a series, we’ll see how to use these new rules to check a script for problems running on PowerShell 3,

PowerShell Logo
The Next Release of PowerShell – PowerShell 7

Recently, the PowerShell Team shipped the Generally Available (GA) release of PowerShell Core 6.2. Since that release, we’ve already begun work on the next iteration!
We’re calling the next release PowerShell 7, the reasons for which will be explained in this blog post.

PowerShell Logo
DSC Resource Kit Release April 2019

We just released the DSC Resource Kit!
This release includes updates to 13 DSC resource modules. In the past 6 weeks, 87 pull requests have been merged and 90 issues have been closed, all thanks to our amazing community!
The modules updated in this release are:

CertificateDsc
ComputerManagementDsc
NetworkingDsc
OfficeOnlineServerDsc
SecurityPolicyDsc
SharePointDsc
SqlServerDsc
StorageDsc
xActiveDirectory
xPSDesiredStateConfiguration
xSMBShare
xWindowsUpdate
xWinEventLog

xWebAdministration is also in the pipeline for release as soon as it passes all tests.

PowerShell Logo
The PowerShell Gallery is now more Accessible

Over the past few months, the team has been working hard to make the PowerShell Gallery as accessible as possible. This blog details why it matters and what work has been done.
Why making the PowerShell Gallery more accessible was a priority
Accessible products change lives and allow everyone to be included in our product.

PowerShell Logo
LiveFyre commenting will no longer be available on the PowerShell Gallery

Commenting on the PowerShell Gallery is provided by LiveFyre–a third-party comment system. LiveFyre is no longer supported by Adobe and therefore we are unable to service issues as they arise. We have gotten reports of authentication failing for Twitter and Microsoft AAD and unfortunately we are unable to bring back those services.

PowerShell Logo
PowerShell ScriptAnalyzer Version 1.18.0 Released

PSScriptAnalyzer (PSSA) 1.18.0 is now available on the PSGallery and brings a lot of improvements in the following areas:

Better compatibility analysis of commands, types and syntax across different platforms and versions of PowerShell
Better formatting and customization. New capabilities are:

Multi-line pipeline indentation styles
Cmdlet casing for better consistency and readability
Consistent whitespace inside braces and pipes

Custom rules can now be suppressed and preserve the RuleSuppressionID
Better DSC support by being able to understand different syntaxes of Import-DscResource
Better user experience by being able to pipe to Invoke-ScriptAnalyzer and added tab completion of the returned objects that are piped to the next pipeline
Better handling of parsing errors by emitting them as a diagnostic record with a new Severity type
Improved Performance: Expect it to be about twice as fast in most cases and even more when re-analyzing a file.

PowerShell Logo
The PowerShell Extension is now in the Azure Data Studio Marketplace

We are excited to announce the PowerShell Extension is available in the Azure Data Studio (ADS)
marketplace!
Now you can write PowerShell scripts with the full benefits of PowerShell Editor Services
using the excellent IDE-like interface that Azure Data Studio provides.

PowerShell Logo
Invoke-Sqlcmd is Now Available Supporting Cross-Platform

The official SqlServer module now includes a version of the Invoke-Sqlcmd cmdlet that runs in PSCore 6.2 and above. The version of the SqlServer module which contains this cmdlet is 21.1.18095-preview and is available in the PowerShell Gallery. In order to install this preview version of the module,

PowerShell Logo
DSC Resource Kit Release February 2019

We just released the DSC Resource Kit!
This release includes updates to 14 DSC resource modules. In the past 6 weeks, 126 pull requests have been merged and 102 issues have been closed, all thanks to our amazing community!
The modules updated in this release are:

ActiveDirectoryCSDsc
CertificateDsc
ComputerManagementDsc
DFSDsc
NetworkingDsc
PSDscResources
SharePointDsc
SqlServerDsc
StorageDsc
xActiveDirectory
xExchange
xHyper-V
xPSDesiredStateConfiguration
xWebAdministration

For a detailed list of the resource modules and fixes in this release,

PowerShell Logo
Parsing Text with PowerShell (3/3)

This is the third and final post in a three-part series.

Part 1:

Useful methods on the String class
Introduction to Regular Expressions
The Select-String cmdlet

Part 2:

the -split operator
the -match operator
the switch statement
the Regex class

Part 3:

a real world,