The Windows “Security” log contains rich audit information. By default, it logs all requests for privilege elevation which occurs when...
Powershell
How to Correctly Wrap Multiple Results
Whenever a PowerShell function needs to return more than one kind of information, it is important to wrap them as objects. Only then will the caller...
Explore WMI
Get-WmiObject and Get-CimInstance both can provide you with a lot of valuable information, provided you know the name of WMI classes to query. Here...
Registering Default PowerShell Repository
If you use the PowerShellGet module (which ships by default on Windows 10 and Server 2016), you can easily download and install shared PowerShell...
Find Installed Software
Most installed software registers itself in one of four places inside the Windows Registry. Here is a quick PowerShell function called...
Disable OneDrive in Windows 10
Are you also irritated by the OneDrive icon found in the navigation tree in explorer? If you never use OneDrive, here are two easy-to-use PowerShell...
Alternate Get-Service
The cmdlet Get-Service has a number of drawbacks. For example, there is no parameter to filter running or stopped services, and the results do not...
Robocopy Light
Robocopy.exe is an extremely powerful and versatile built-in command to copy files efficiently from one location to another. Unfortunately, this...
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...