ps1

Converting Error Numbers

All PowerShell Versions Error numbers that are returned by Windows API calls often appear as very large negative numbers. To give meaning to these...

read more

Creating HTML Colors

All Versions To convert decimal color values to a hexadecimal representation, like the one used in HTML, try this line: PS>...

read more

Getting Help

PowerShell 3.0 and later Provided you have downloaded PowerShell help via Update-Help, you can create yourself an excellent help topic viewer with...

read more

Pinging via IPv4

All PowerShell versions You can use ping.exe just like any other command inside PowerShell scripts. By adding “-4” to the command line,...

read more

Use F1 in PowerShell ISE

PowerShell ISE 3 and later When you have downloaded the PowerShell help files (using Update-Help from an elevated shell), you can use the Get-Help...

read more

Invoke-Expression is Evil

All PowerShell versions Try and avoid Invoke-Expression in your scripts. This cmdlet takes a string and executes it as if it was a command. In most...

read more

Reading In PFX-Certificate

All PowerShell versions When you use Get-PfxCertificate, you can read in PFX certificate files and use the certificate to sign scripts. However, the...

read more

Faking Object Type

PowerShell 3 and later The internal PowerShell ETS is responsible for converting objects to text. To do this, it looks for a property called...

read more
1 66 67 68 69 70 128