posts-powershell

Using FileSystemWatcher Correctly (Part 2)

Translating VBScript to PowerShell

Most old VBS scripts can be easily translated to PowerShell. The key command in VBS is “CreateObject” which lets you access system libraries....

Using FileSystemWatcher Correctly (Part 2)

Detecting WinPE

Running PowerShell in WinPE Environments PowerShell can run inside WinPE environments. If you’d like to detect whether your PowerShell script runs...

Using FileSystemWatcher Correctly (Part 2)

Running CMD commands in PowerShell

PowerShell by default does not support the native cmd.exe command such as „dir“. Instead, it uses historic aliases called “dir” to point you to the...

Using FileSystemWatcher Correctly (Part 2)

Progress Bar Timer

Use the PowerShell progress Bar Here is a simple example using the PowerShell progress bar. The code displays a progress bar counting down a break....

Using FileSystemWatcher Correctly (Part 2)

Reading Event Logs Smart (Part 1)

When you query an event log with PowerShell, by default you get back a text message with the logged information. For example, if you’d like to know...

Using FileSystemWatcher Correctly (Part 2)

Turning Display Off Immediately

If you are about to launch a lengthy automation script, why not turn off the display right away instead of waiting for the screen saver timeout to...