Friday, February 29, 2008

Force detection on Windows Server Update Services Clients

Common Scenario: You just rebooted your server after installing updates. You know there are still updates the your server doesn't have installed, but the server isn't pulling them down from your Windows Server Update Services (WSUS) server. There's not enough time in your maintenance window to go to and download the remaining updates, that's why you have a WSUS server in the first place right?

On Windows XP and Windows Server 2003 you can force detection by running the command:

%windir%\System32\wuauclt.exe /detectnow

You won't see any immediate results, but within a few minutes the familiar yellow shield should show up in the notification area informing you that updates are being downloaded or that updates have been downloaded and are ready to install.

Even though I'm fairly up to date with updates in my system images and Microsoft Office installs, I still try to run this after imaging a system or installing Microsoft Office just to make sure nothing was missed before handing things over to the customer.

Tuesday, February 5, 2008

Find and Disable Inactive Computer Objects in Active Directory

I like my Active Directory, or at least the OUs in AD that I manage, to not have stale objects hanging around. Over time computers come and go, but they often leave behind their accounts in your Active Directory. I like to automate things as much as possible, so to go through AD and find inactive computers I wrote a VB Script to find stale computer accounts and disable them for me. As this is a mostly automated process, I wrote the script to update the object description in Active Directory so that it is clear why the computer object is disabled.

View and Download ADInactiveComputers.vbs on GitHub:Gist