January 2013 archive

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

Find Email Address in Active Directory

LDAP proxyAddresses Query

Did you ever try to create a new email address and receive an error message that it already exists?  Or did you ever have someone ask who is using an email address?  Here are some methods to find the email address: 1 – Active Directory Users and Computers Saved Queries (Server 2003 and up) In …

Continue reading

Identify a Windows VM Disk in vSphere

Disk Properties

If you have ever worked with VMWare’s vSphere, I’m sure there has come a time that you needed to modify or remove Windows VM Disk.  Sure, it’s a simple enough task, but what if you have multiple disks that are the same size?  How can you correctly identify the virtual disk in vSphere?  Luckily, it …

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

DHCP Message Class

Here is a class I wrote to generate a DHCP message.  It’s primary purpose is to send a DHCP message, which can be useful for finding DHCP servers on a network   using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; using System.Net; using System.Globalization; using System.Text.RegularExpressions; namespace SigkillDHCP { public class DhcpMessage { …

Continue reading

GroupModifyManager.vbs

‘========================================================================= ‘ GroupModifyManager.vbs ‘ VERSION: 1.0 ‘ AUTHOR: Brian Steinmeyer ‘ EMAIL: [email protected] ‘ WEB: https://sigkillit.com ‘ DATE: 1/4/2013 ‘ COMMENTS: This will set the manager for a group and optionally allow them ‘ to update group membership. Set the manager by specificying the LDAP path ‘ or DN of the user you want to …

Continue reading