PowerShell for Windows Admins:

May, 2018

1

May 22, 2018  1:01 PM

PowerShell parameter sets

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

PowerShell parameter sets allow you to control which parameters can be used together. If a parameter isn’t in the parameter set you’re trying to use you’ll get an error message.

PS> Get-VM -Name XYZ -id (New-Guid)
Get-VM : Parameter set cannot be resolved using the specified named...

May 22, 2018  8:52 AM

PowerShell version

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Discovering the PowerShell version you’re using can be an interesting task. The automatic variable $PSVersionTable was introduced in PowerShell v2. On my Windows 10 version 1803 machine for Windows PowerShell I get PS> $PSVersionTable Name Value ---- ----- PSVersion...


May 18, 2018  11:39 AM

Format Data

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

PowerShell will format the output of objects that it knows about. For instance Get-Process shows different sets of properties depending on whether you choose a table or list view. The format data is stored in files named *.format.ps1xml. In Windows PowerShell the format files are found in...


May 15, 2018  8:11 AM

where –not

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

PowerShell v6.1 preview 2 has added the where –not option. The option adds another parameter to the syntax where-object <property name> <operator like parameter> <value> Couple of examples of using the syntax Get-Process | where CPU -gt 12 Get-Service | where...


May 11, 2018  8:52 AM

Calculating standard deviation

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Calculating a standard deviation isn’t a difficult exercise but PowerShell v6.1 offers an easier method. In Windows PowerShell v5.1 and PowerShell v6.0 the Measure-Object cmdlet has this syntax PS> Get-Command Measure-Object -Syntax Measure-Object [[-Property] <string[]>]...


May 9, 2018  7:58 AM

PowerShell problem reporting

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

There seems to be a lot of confusion about PowerShell problem reporting. The difference between Windows PowerShell (the one you find pre-installed on Windows machines) current version v5.1 and PowerShell (the open source project) current version v6.0 isn’t really understood and that lies at...


May 3, 2018  5:30 AM

PowerShell Summit 2018 videos

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

The PowerShell Summit 2018 videos are available at 0 Comments     RSS Feed     Email a friend


1

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: