PowerShell Examples

Click the diskette icon to dowload the ZIPped source Click the floppy disk icons to download the ZIPped sources

PowerShell examples
Click the diskette icon to dowload the ZIPped source Name Description Last modified (DD/MM/YYYY) Also available in Remarks
DOS
batch
NT
batch
JScript Kix Perl Rexx VB
Script
Click the diskette icon to dowload the ZIPped source 2ASCII
2Unicode
2UTF8
Convert any text file to ASCII, Unicode or UTF-8 26/09/2006   NT         V NT batch command converts from Unicode to ASCII, VBScript converts any text format to Unicode
Click the diskette icon to dowload the ZIPped source BIOS Display BIOS properties 11/09/2006   NT   K P R V Generated by my WMIGen.hta.
For a simpler list, just use the command get-wmiobject -class Win32_BIOS instead.
Click the diskette icon to dowload the ZIPped source CDEject Eject all CDROMs 11/09/2006       K   R V Requires Windows Media Player.
OS/2 Rexx script uses OS/2 MultiMedia (MMOS2) Rexx Support.
Click the diskette icon to dowload the ZIPped source DHCPBackup Backup daily DHCP logs 30/08/2007               Script by Jason Carter, Marshall University Computing Services
Click the diskette icon to dowload the ZIPped source GetRes Show screen resolution 11/09/2006   NT   K P R V Generated by my WMIGen.hta.
The Rexx version is for OS/2, use WMIGen.hta. to generate an Object Rexx version for Windows.
Click the diskette icon to dowload the ZIPped source LeapYear Check if the specified year is a leap year 25/10/2006 D NT J K P R V DOS batch version uses BatchMan by Michael Mefford.
Click the diskette icon to dowload the ZIPped source Memory Display total and free amounts of physical memory 21/10/2006 D NT         V  
Click the diskette icon to dowload the ZIPped source PSVer Display PowerShell executable file version 15/10/2006                
Click the diskette icon to dowload the ZIPped source ShowCpuH Display CPU details in an HTML page 01/09/2006                
Click the diskette icon to dowload the ZIPped source ShowPRN Display all printers 10/09/2006   NT         V Generated by my WMIGen.hta.
For a simpler list, just use the command get-wmiobject -class Win32_Printer instead.
Click the diskette icon to dowload the ZIPped source ShowPrnH Display all printers in an HTML page 31/08/2006                
Click the diskette icon to dowload the ZIPped source Today Display today's yesterday's and tomorrow's date in 2 formats 05/07/2006 D NT J K P R V Today.ps1 combines the functions of my SortDate, Yesterday and Tomorrow scripts as available in other scripting languages
Click the diskette icon to dowload the ZIPped source TxtComp Compare 2 text files and display the differences 23/10/2006           R    
Click the diskette icon to dowload the ZIPped source Week Display current week number 26/06/2006 D NT J K P R V  
Click the diskette icon to dowload the ZIPped source Which Locate the specified program file 27/07/2006 D NT   K P R   See my WHICH page
Click the diskette icon to dowload the ZIPped source WMIGen.hta This HTA generates Batch, JScript, KiXtart, Object Rexx, Perl, PowerShell, Python and VBScript code for WMI queries 20/10/2006             HTA Automatically checks for updates on startup.
Based on the example from the Microsoft TechNet ScriptCenter article Scripting Eye for the GUI Guy, with help from the Scripting Guys' Scriptomatic 2.0 and HTA Helpomatic tools and The Script Center Script Repository: Sample Windows PowerShell Scripts

visitors can't be wrong...

page last uploaded: 31 July 2009, 12:04