Option Explicit ‘========================================================================= ‘ DirMirror.vbs ‘ VERSION: 1.0 ‘ AUTHOR: Brian Steinmeyer ‘ EMAIL: [email protected] ‘ WEB: https://sigkillit.com ‘ DATE: 9/26/2013 ‘ REQUIREMENTS: ‘ – robocopy.exe (Built in to Server2008+, Windows 7+) ‘ – blat.exe, blat.dll. blat.lib in the same directory as the script (http://www.blat.net) ‘ – Blat profile installed to email results ‘ – …
Category: VBScript
Jan 26 2013
Running VBScripts with UAC Elevation
Overview Since the introduction of User Account Control (UAC), scripts do not run with administrator privileges despite being a local administrator. You must elevate your script to run with administrator privileges. I’ll start by showing you a simple example. The script below will list all of the processes on the local computer as well as …
Jan 25 2013
ElevateWscript.vbs
‘========================================================================= ‘ ElevateWscript.vbs ‘ VERSION: 1.0 ‘ AUTHOR: Brian Steinmeyer ‘ EMAIL: [email protected] ‘ WEB: https://sigkillit.com ‘ DATE: 1/25/2012 ‘ COMPATIBLE: Windows Vista, Server 2008, and Above ‘ COMMENTS: Since the introduction of UAC in Windows, despite being an ‘ administrator you may still need to run a script with elevated ‘ privileges. For example …
Jan 22 2013
ComputerInventory.vbs
‘========================================================================= ‘ ComputerInventory.vbs ‘ VERSION: 1.0 ‘ AUTHOR: Brian Steinmeyer ‘ EMAIL: [email protected] ‘ WEB: https://sigkillit.com ‘ DATE: 1/21/2013 ‘ COMPATIBLE: Windows XP+, Server 2003+. If you are using on Windows 2003, ‘ to get correct CPU Physical and Core Counts make sure you have the following ‘ hotfix installed: http://support.microsoft.com/kb/932370 ‘ COMMENTS: Loops through …
Jan 18 2013
PingHost.vbs
‘========================================================================= ‘ PingHost.vbs ‘ VERSION: 1.0 ‘ AUTHOR: Brian Steinmeyer ‘ EMAIL: [email protected] ‘ WEB: https://sigkillit.com ‘ DATE: 1/17/2013 ‘ COMMENTS: Pass a hostname or IP to the function and the number of times ‘ you wish to ping the host/IP, and it will return whether it is succesful ‘ or not. ‘ EXAMPLE: Ping …
Jan 18 2013
CheckHTTPStatus.vbs
‘========================================================================= ‘ CheckHTTPStatus.vbs ‘ VERSION: 1.0 ‘ AUTHOR: Brian Steinmeyer ‘ EMAIL: [email protected] ‘ WEB: https://sigkillit.com ‘ DATE: 1/17/2013 ‘ COMMENTS: Pass the URL and optionally a username/password to the Function ‘ and it will check the HTTP return status code. ‘ EXAMPLE: Check If Website is Running ‘ Dim strURL: strURL = “http://www.domain.com” ‘ …
Jan 18 2013
CheckServiceRunning.vbs
‘========================================================================= ‘ CheckServiceRunning.vbs ‘ VERSION: 1.0 ‘ AUTHOR: Brian Steinmeyer ‘ EMAIL: [email protected] ‘ WEB: https://sigkillit.com ‘ DATE: 1/17/2013 ‘ COMMENTS: Pass the computer/servername to the function and the Service name ‘ and it will return whether the service is running. ‘ EXAMPLE: Check if the Print Spooler is Running ‘ strComputer = “Server” ‘ …