ps1

Check for Pending Reboot

The code below tests whether a reboot is pending: $rebootRequired = Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based...

read more

Disabling Webcams

Looking for privacy? Here is a short script that looks for enabled cameras on your system and offers you to disable any camera you don’t want...

read more

Using SOAP Webservices

Even though SOAP hasn’t been used widely for public webservices (in favor of more simplistic REST services), internally many companies do use...

read more

Advanced Sorting (Part 4)

In the previous parts we illustrated how you can use script blocks to gain more control over sorting. For example, you can use the “-as”...

read more

Advanced Sorting (Part 3)

In the previous tip you have seen how Sort-Object accepts hash tables, providing you with advanced control over the sorting. For example, this line...

read more

Advanced Sorting (Part 2)

Sort-Object supports advanced sorting and provides much more control when you submit a hash table. The hash table can for example control sort...

read more

Advanced Sorting (Part 1)

Sort-Object easily sorts results for you. For primitive data such as numbers or strings, simply add Sort-Object to your pipeline. This gets you a...

read more

When Speed Matters

PowerShell is a general-purpose automation language, so it aims to be versatile and intuitive to use. Speed is not the top priority. If you do care...

read more

Loading Text Files (Fast)

If you need to load large text files and are using Get-Content, then chances are you can save a lot of time. If you are not immediately processing...

read more