PowerShell comes with a powerful yet simple way of monitoring file changes. Let’s assume you have a log file that changes every now and then....
Powershell
Detecting Storage Issues
In Windows 10 and Windows Server 2016, PowerShell can access storage reliability data so you can find out whether there is something wrong with one...
Resetting Winsock
PowerShell can execute internal PowerShell commands and also regular console commands, so it’s not a bad thing to continue to use console...
Using Awesome Export-Excel Cmdlet (Part 5)
This is part 5 of our mini-series about the awesome and free “ImportExcel” PowerShell module by Doug Finke. Make sure you install the...
Using Awesome Export-Excel Cmdlet (Part 4)
This is part 4 of our mini-series about the awesome and free “ImportExcel” PowerShell module by Doug Finke. Make sure you install the...
Using Awesome Export-Excel Cmdlet (Part 3)
This is part 3 of our mini-series about the awesome and free “ImportExcel” PowerShell module by Doug Finke. Make sure you install the...
Using Awesome Export-Excel Cmdlet (Part 2)
This is part 2 of our mini-series about the awesome and free “ImportExcel” PowerShell module by Doug Finke. Make sure you install the...
Using Awesome Export-Excel Cmdlet (Part 1)
Doug Finke has created an awesome PowerShell module called ImportExcel which comes with all the commands you need to import and export data from and...
Auto-Creating a List of HTTP Response Codes
In the previous example we looked at how numeric HTTP response codes can automatically be converted to descriptive text, simply by converting them...
Converting HTTP Response Codes
In the previous example we created a small PowerShell function that checks web site availability, and as part of the test results, a HTTP response...
Test Web Site Availability
When a web site is unavailable, often the question is whether it’s you, or whether the web site is generally down for everyone else, too....
Unit Conversion via Web Service
Accessing RESTful web services is trivial for PowerShell: simply send your input data to a public web service, and receive the results. Here are...
Validating Active Directory Credentials
PowerShell can validate AD username and passwords against the Active Directory: Add-Type -AssemblyName System.DirectoryServices.AccountManagement...
Numbering Output (Part 1)
If you’d like to add an incrementing number to your output, here is a simple way: Get-Process | Select-Object -Property '#',...
Accepting Masked Passwords
If you ever write PowerShell functions that need to accept sensitive input such as passwords, make sure you allow users to submit SecureString...
Finding Hidden PowerShell Applications
The most widely known PowerShell hosts are certainly powershell.exe and powershell_ise.exe because they ship out-of-the-box. However, there can be...
Controlling Processor Affinity
Most modern computers have more than one processor, either physical or logical. If you’d like to find out the number of processors, here is a...
Dumping All Passwords from Chrome
In the previous tip we illustrated how you can dump all passwords from your personal Windows Password Vault. The same is true for basically any...
Dumping Personal Passwords from Windows
Windows has a protected password vault where it can store your secret passwords so you don’t have to always enter them manually in Internet...
Installing Google Chrome via PowerShell
To download and install the Google Chrome browser, simply combine a couple of generic PowerShell commands: $Installer =...
Using Pop-up Dialogs that Are Always Visible
In the previous tip we used an old COM technique to display a pop-up box with a built-in timeout. That worked pretty well except that the dialog box...
Use Hash Tables to Make Code Readable
Maybe you stumbled across code like this in the past: $shell = New-Object -ComObject WScript.Shell $value = $shell.Popup('Restart...
Increasing Pipeline Speed
The PowerShell pipeline tends to be slow when it is processing a lot of elements. This can take a lot of time: $result = 1..15000 | ForEach-Object {...
Detecting Key Presses
It may be useful for PowerShell to know whether a given key is currently pressed. This way, your profile script could, for example, do things during...