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 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 2006-09-26   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 2006-09-11   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 2006-09-11       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 2007-08-30               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 2006-09-11   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 2011-05-10   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 2006-10-25 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 2006-10-21 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 2006-10-15                
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 2006-09-01                
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 2006-09-10   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 2006-08-31                
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 2006-07-05 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 2006-10-23           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 2006-06-26 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 2006-07-27 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#, Delphi, F#, Java, JScript, KiXtart, Lua, Object Pascal, Object Rexx, Perl, PowerShell, Python, Ruby, VB .NET and VBScript code for WMI queries 2014-01-03             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: 17 January 2014, 10:52