Robocopy.exe is an extremely powerful and versatile built-in command to copy files efficiently from one location to another. Unfortunately, this...
ps1
Create Summary Objects for Inventory
Beginning in PowerShell 3, a PSCustomObject can easily combine valuable information that you gathered from different sources. Here is an example...
Scraping Quotes from WikiQuote
Here is a fun script that may not work forever. It takes one or more topics you choose, then returns one or more random quotes taken from the...
Controlling Audio (Mute and Volume)
Ole Morten Didriksen has dug out some API calls that enable audio volume control (https://gist.github.com/oledid). With this, it is trivial from...
A better Get-History
When you type “h” in PowerShell, you see the history of commands you entered during your session. Inspired by Pratek Singh...
Getting MAC Vendor List
Prateek Singh has invested some effort in creating a sanitized MAC vendor address list in CSV format which can be found in his blog...
Creating Excel Reports (Part 3 – Individually Accessing Workbook)
Sometimes you may want to create irregularly shaped reports, that is reports in a non-table design. For this, PowerShell lets you connect to the...
Creating Excel Reports (Part 2 – Colorful)
When you load CSV data into Excel, you cannot specify formatting, fonts or colors. This is different when you load HTML data into Excel. Here is an...
Creating Excel Reports (Part 1 – Black and White)
The most simple way of creating Excel reports requires just a couple of lines of PowerShell code: dump the results to a CSV file, then submit it as...
Creating HTML Reports (Part 5 – Applying Style and Design)
In the previous tip we started to turn PowerShell results into HTML reports. The report content is now just fine. To impress people, the report just...
Creating HTML Reports (Part 4 – Renaming Columns)
In the previous tip we started to turn PowerShell results into HTML reports. The report content is now almost done. You just may want to polish some...
Creating HTML Reports (Part 3 – Adding Headers and Footers)
In the previous tip we started to turn PowerShell results into HTML reports. It now needs some headers and footers. This is where we left off:...
Creating HTML Reports (Part 2 – Fixing Non-String Content)
In the previous tip we started to turn PowerShell results into HTML reports. So far, the report is produced but still looks ugly. This is where we...
Creating HTML Reports (Part 1 – Creating HTML)
To turn PowerShell results in a HTML report, simply pipe the results to ConvertTo-Html, then save the result to file. So in its most basic form, it...
Control Console Transparency on Windows 10
On Windows 10, when you open a PowerShell console, simply hold CTRL+SHIFT, then turn your mouse wheel, to control console background transparency....
Finding Installed Updates (and searching for missing) (Part 4)
Sometimes, the Microsoft.Update.Session object is used to check whether a given update is present on a machine. Some authors query the text title...
Finding Installed Updates (and searching for missing) (Part 3)
When you want to examine installed updates on your machine, rather than searching for updates online and then comparing the installation status with...
Finding Installed Updates (and searching for missing) (Part 2)
When PowerShell asks Windows for updates via the Microsoft.Update.Session object, some information seems to be unreadable. The code below dumps...
Finding Installed Updates (and searching for missing) (Part 1)
Windows can automatically determine the updates that may be missing on your system, provided you have an Internet connection. PowerShell can use the...
Auto-Logging Command Output
In the previous tip we introduced the PreCommandLookupAction supported by PowerShell 3 and better. Today we have a special implementation for you....
Replacing Commands
PowerShell comes with a couple of “secret” (better: under-documented) settings. One is PreCommandLookupAction, and it gives you great...
Easy Parsing of Setting Files (Part 3)
In the previous tip you have discovered how ConvertFrom-StringData can turn plain text key-value pairs into a hash table. What’s missing is...
Easy Parsing of Setting Files (Part 2)
In the previous tip we used ConvertFrom-StringData to parse plain text key-value pairs into hash tables. Here is an example where such conversion...
Easy Parsing of Setting Files (Part 1)
Let’s assume you want to save settings to a file in the most simplest form. Your settings may look like this: $settings = ' Name=Weltner...