ps1

Displaying Message Boxes

PowerShell can access all public .NET classes, so it is (fairly) easy to create a message box: $result = [System.Windows.MessageBox]::Show('Do...

read more

Finding ASCII Codes

Here is an easy way to find the ASCII code for any character you may have scraped from a website, or found in a script that you copied from the...

read more

Finding Auto Starts

PowerShell 3+ If you’d like to know which programs start automatically on your machine, WMI may help: PS C:\> Get-CimInstance -ClassName...

read more

Replacing CSV File Headers

PowerShell 2+ When you read in CSV data and would like to rename the CSV headers, here is a simple approach: just read in the text line by line, and...

read more

Using Friendly Robocopy

PowerShell 2+ Robocopy is a tool of choice to copy files, and that does not change with PowerShell. You can, however, use PowerShell to embed...

read more

The Truth About WinRM

PowerShell 3+ The popular winrm command to manage and configure PowerShell Remoting is really just a batch and a VBS file: PS> Get-Command winrm...

read more

Display Windows

PowerShell 3+ It is fairly easy to use WPF (Windows Presentation Foundation) to create and show simple dialog windows in PowerShell. If you’d...

read more

Add a Clock to PowerShell

PowerShell 2+ Here is a fun example that illustrates how to work with timers. It adds a clock to the title bar of the PowerShell console or the...

read more

Changing Page File Location

PowerShell 2+ To move the Windows page file to a new location, you can use WMI: #requires -Version 2 $args = @{ Name = "D:\pagefile.sys" InitialSize...

read more
1 47 48 49 50 51 128