posts-powershell

Creating Colored Excel Reports

When you open a CSV file in Excel, you get a very fast data import, but the result is "black and white"; CSV data has no way of colorizing...

Creating Code Snippets for ISE

PowerShell ISE supports code snippets, and you can easily create your own: #requires -Version 3 $code = @' | Where-Object { $_ } '@...

Time for Christmas

It's time for Christmas again, so here is a PowerShell classic: # inspired by: #...

Displaying InputBox

To improve user-friendlyness, you could replace Read-Host by the following Show-InputBox function and get an inputbox dialog window: #requires...

Creating Simple Keylogger

By accessing the Windows low-level API functions, a script can constantly monitor the keyboard for keypresses and log these to a file. This...

Accessing API Functions and Logging Off

You may have heard about pInvoke.net, a site that documents internal Windows API signatures. Signatures describe low-level Windows API system calls....

Executing Code after Script Is Done

For monitoring purposes, it is often not known how long a script needs to run. So here, an endless loop is used. The script runs for as long as the...