Home » 2008 » February

VBScript to find old users in a domain

On Error Resume Next
Const ADS_SCOPE_SUBTREE = 2
Set objConnection = CreateObject(”ADODB.Connection”)
Set objCommand = CreateObject(”ADODB.Command”)
objConnection.Provider = “ADsDSOObject”
objConnection.Open “Active Directory Provider”
Set objCommand.ActiveConnection = objConnection
Set objDSE = GetObject(”LDAP://RootD
SE”)
strDomain = objDSE.Get(”DefaultNamingContext”)
objCommand.CommandText = “SELECT adspath,Name FROM ‘LDAP://” & strDomain & “‘ ” & “WHERE objectClass=’user’ and objectcategory=’person’ and lastlogontimestamp <=’00000000000′”
objCommand.Properties(”Page Size”) = 2000
objCommand.Properties(”Timeout”) = 30
objCommand.Properties(”Searchscope”) = ADS_SCOPE_SUBTREE
objCommand.Properties(”Cache Results”) = […]

Xbox 360: Three red lights flash on the Ring of Light

SYMPTOMS
loadTOCNode(1, \\’symptoms\\’);
You see three lights on the Ring of Light (RoL) flash red on the front of your Xbox 360 console. The upper-right quadrant light is the only light that does not flash red.

CAUSE
loadTOCNode(1, \\’cause\\’);
The three flashing red lights may indicate that your Xbox 360 console has experienced a hardware failure.
1. When you turn on the […]

How to get IP Address Information from Network Adapters Using Vbscript

The following Vbscript will gather Ip address information from network cards:
Set objWMIService = GetObject(”winmgmts:\\”& strComputer & “\root\cimv2″)
Set colAdapters = objWMIService.ExecQuery (”SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True”)
n = 1
For Each objAdapter In colAdapters
wIELine
WriteLineBoldIE “Network Adapter Info”
wIETableHeaderStart “100″
wIERowStart
wIETableHeaderItem “Adapter”
wIETableHeaderItem “IP”
wIETableHeaderItem “Subnet”
wIETableHeaderItem “Gateway”
wIETableHeaderItem “DNS”
wIETableHeaderItem “WINS”
wIERowStop
If Not IsNull(objAdapter.IPAddress) Then
For i = 0 To UBound(objAdapter.IPAddress)
wIERowStart
If i=0 Then
wIERowItem “Adapter […]

VBScript to Enumate Exchange Mailbox sizes

The following vbscript can be used to enumerate the size of mailboxes in an MS Exchange environment:
On Error Resume Next
Dim arrMBX(10,3)
Dim TotalMailboxes
For intElement = 1 To 10
arrMBX(intElement,2) = 0
Next
TotalMailboxes = 0
TopMBSize = 0
LastMBsize = 0
strComputer = InputBox(”Enter the name of the Exchange Server?”,”Top Mailbox Offenders”)
Set objWMIService = GetObject(”winmgmts:{impersonationLevel=impersonate}!\\” & strComputer & “\ROOT\MicrosoftExchangeV2″)
Set colMailboxes = objWMIService.ExecQuery […]

How to Disable CD Autorun in Windows XP

Open Regedit
Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
if it does not already exist create the key: “NoDriveTypeAutoRun”=dword:000000b5
Log out and log back in for the settings to take effect

CD Autorun Operating System Windows XPCD Autorun Operating System Windows XP

Windows Vista Search Engine

var swickiSidebar=
{
canvasColor: \’#EEEEEE\’, // use \’#EEAAFF\’ hex format or
TextColor: \’#000E3A\’, // web standard color names
TagLinkColor: \’#0033CC\’,
TagHoverBGColor: \’transparent\’,
[…]

HOW TO Disable Notification Area Balloon Tips in Windows XP

Note: the steps below only affect the current user. These steps disable all Notification Area balloon tips for this user. There is no way to disable balloon tips for specific programs only.
1. Click Start, click Run, type regedit, and then press ENTER.
2. Navigate to the following subkey: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
3. […]

How to find out what policies are applied to your Windows Xp machine

Help and Support Center -> Use Tools to view your computer information and diagnose problems -> Advanced System Information -> View Group Policy settings applied
Results will as “Group Policy Results for <computername>. At the end of the report there is the option to save in html format: “Save this report to an .htm file.”
You […]

MOM SQL Errors

Problem: SQL Error encountered when opening a report; the Management Packs/Reports have been imported successfully.
Solution:
DTS has not created views yet. If Reporting has just been installed, reimport any Management Packs installed prior to the Reporting install, and then execute the DTS package to create the necessary views.

MOM MOM 2005 […]

How can I remotely enable Remote Desktop on Windows Server 2003 and Windows XP?

Start -> Run -> type Regedit
Click on File, then choose “Connect Network Registry”.
In the Select Computer search box either browse Active Directory to locate the remote server, or type its name in the dialog box.
In the remote machine’s registry navigate to the following key: HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server
Under the Terminal Server […]