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...
posts-powershell
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...
Overriding Out-Default (Part 3)
Advanced PowerShell users often find themselves doing one of three things: They run a previous command and add Get-Member to learn more about the...
Overriding Out-Default (Part 2)
When you override Out-Default to do something meaningful, you really want to make sure the old behavior isn’t lost, and instead just something...
Overriding Out-Default (Part 1)
Out-Default is a hidden PowerShell cmdlet that gets called at the end of each command, and outputs results to the console. You can override this...
Use Out-GridView as Output Window
Typically, Out-GridView opens a window and displays whatever you pipe into the cmdlet: PS C:\> Get-Service | Out-GridView However, with a little...
Beer Challenge Results: Shortest Code for Password Analysis
At psconf.eu there was recently a challenge for the shortest code to check for how often a password was previously pwnd (hacked). Here is the result...
Geocoding: Sentiment Analysis (Part 5)
Some geocoding APIs provide sophisticated sentiment analysis like in the example below: "Most important museums of Amsterdam are located on the...
Geocoding: Text Scanning (Part 4)
Geocoding can automatically extract geolocations from text. This example also shows a new way of submitting information to a server: in the example...
Geocoding: Converting Lat/Long to Addresses (Part 3)
Today, we’d like to do the opposite and translate latitude and longitude into an address: '52.37799,9.75195' | ForEach-Object -Begin...
Geocoding: Converting Addresses to Lat/Long (Part 2)
Let’s start with translating addresses into latitude and longitude coordinates. We assume you read the previous parts to fully understand the...
Working with GeoCoding (Part 1)
Last year, Google changed their terms and requires an individual API key now to use their geocode API. Fortunately, there are free alternatives, so...
Using Session Variables in Web Requests
Sometimes, web requests that work fine in a browser do not seem to work well in PowerShell. For example, when you navigate to...
Left Side of Comparison
When using comparison operators, always make sure the relevant part is placed left. That’s because PowerShell looks at the left side of an...
Subscribe to Lock and Unlock Events
Whenever a user locks his machine, and whenever a user unlocks a machine, Windows emits an event. PowerShell can subscribe to these events and do...
Finding Installed Updates (Part 2)
The Windows Update Client maintains its own log of installed updates. Rather than querying the generic system event log, or actively searching for...
Finding Installed Updates (Part 1)
Get-Hotfix returns installed hotfixes but really only is a wrapper around the Win32_QuickFixEngineering WMI class. It is not returning all installed...