PowerShell Examples

Checksums for the ZIPed sources Click the question mark icons to view the MD5 and SHA1 checksums for the ZIPed sources

 

PowerShell examples
Click the floppy disk icons to dowload the ZIPed sources Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed sources Name Description Last modified (DD/MM/YYYY) Also available in Remarks
DOS
batch
NT
batch
JScript KiXtart Perl Rexx VB
Script
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed 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 floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed 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 floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed 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 floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source DHCPBackup Backup daily DHCP logs 30/08/2007               Script by Jason Carter, Marshall University Computing Services
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed 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 floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source GetTitle Read the console window title 10/05/2011   NT            
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed 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 floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source Memory Display total and free amounts of physical memory 21/10/2006 D NT         V  
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source PSVer Display PowerShell executable file version 15/10/2006                
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source ShowCpuH Display CPU details in an HTML page 01/09/2006                
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed 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 floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source ShowPrnH Display all printers in an HTML page 31/08/2006                
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed 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 floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source TxtComp Compare 2 text files and display the differences 23/10/2006           R    
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source Week Display current week number 26/06/2006 D XP J K P R V  
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source Which Locate the specified program file 27/07/2006 D NT   K P R   See my UNIX ports page
Click the floppy disk icon to dowload the ZIPed source   WMIGen.hta This HTA generates Batch, C#, F#, JScript, KiXtart, Object Rexx, Perl, PowerShell, Python, Ruby, VB .NET and VBScript code for WMI queries 19/05/2011             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.
C# code generation with assistance of Bas van der Woude.

 

 


page last uploaded: 19 May 2011, 22:25