Category: VBScript

DirMirror.vbs

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 ‘ – …

Continue reading

DeleteOldUsers.vbs

‘========================================================================= ‘ DeleteOldUsers.vbs ‘ VERSION: 1.0 ‘ AUTHOR: Brian Steinmeyer ‘ EMAIL: [email protected] ‘ WEB: https://sigkillit.com ‘ DATE: 4/22/2014 ‘ USER TERMINATION POLICY: ‘ – Reset PW ‘ – Set description to termination date ‘ – Optionally forward email ‘ – Move terminated users to specified OU ‘ COMMENTS: This script works in conjunction with …

Continue reading

SyncToy21.vbs

‘========================================================================= ‘ SyncToy21.vbs ‘ VERSION: 1.0 ‘ AUTHOR: Brian Steinmeyer ‘ EMAIL: [email protected] ‘ WEB: https://sigkillit.com ‘ DATE: 3/20/20114 ‘ REQUIREMENTS: You must install SyncToy on the Workstation and manually run it to click on ‘ the agreement statement, otherwise this script will lock up and NEVER back up!!! ‘========================================================================= Option Explicit ‘ —— SCRIPT …

Continue reading

ConvertOutlookContactsToAD.vbs

‘========================================================================= ‘ ConvertOutlookContactsToAD.vbs ‘ VERSION: 1.0 ‘ AUTHOR: Brian Steinmeyer ‘ EMAIL: [email protected] ‘ WEB: https://sigkillit.com ‘ DATE: 2/9/2013 ‘ REQUIREMENTS: Requires Exchange Tools or CDOEXM.DLL on the computer running ‘ the script to create Email enabled contacts. The script also uses OLEDB, ‘ which requires running it with %systemroot%\SysWow64\wscript.exe, ‘ %systemroot%\SysWow64\cscript.exe, or a 64-bit …

Continue reading

Running VBScripts with UAC Elevation

User1 Task Manager Notepad Process Results

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 …

Continue reading

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 …

Continue reading

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 …

Continue reading

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 …

Continue reading

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” ‘ …

Continue reading

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” ‘ …

Continue reading