PowerShell 3.0 Notes

We will post all miscellaneous PowerShell scripts, notes, tips and help on this page. For notes from specific books, please look at the index on the Main page for the book link to the page.

PowerShell Script to set video resolution on startup

Here is a script that will set your video resolution in PowerShell. I gleaned it from Setting your screen resolution

Ternary Operators in PowerShell (well, sort of…)

Here is an example of a ternary operator in C#:

Fortunately, there is a way however it doesn’t use the usual ?: notation:

It’s also possible to call a function from within the query:

Creating a script and executing in on a remote server

Discovering the alias for a cmdlet

…which returns this to the output:

Removing Leading Zero from IP Addresses using Regular Expressions

IIS Worker Processes in PowerShell

Views – 2357

Leave a Reply