Tuesday, April 13, 2010

Hide the ConfigMgr task sequence dialog box

Found this today. Figured I would post it up here.

You can hide the task sequence dialog box for a step by having your script run the following code. After that step is completed however and the next step starts, the dialog box will come back.

Set oTSProgressUI = CreateObject("Microsoft.SMS.TSProgressUI")
oTSProgressUI.CloseProgressDialog
Set oTSProgressUI = Nothing 

Friday, April 9, 2010

ConfigMgr Console | The RPC Server is unavailable

In the event that you get the error

The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

when trying to launch the ConfigMgr console on a remote machine, the following is probably what's going on.

You're probably running Configuration Manager on a Server 2008 host, and you haven't unblocked Remote Administration in the Windows Firewall. Either unblock that, or disable the Windows Firewall. Whichever you decide to do should fix your problem and allow you to manage ConfigMgr remotely.

Targeting Mass Storage drivers in your task sequences

So this has taken forever to figure out, so it's well worth documenting in detail. Below are detailed instructions on having OSD inject mass storage drivers into Windows XP so that the XP mini setup can copy installation files and such.

The first thing you need to do is find a computer that needs additional storage drivers. In my case I have a Lenovo T500 that needs additional drivers for setup to work correctly. First I had to download the Mass Storage drivers. You can generally do this from the manufactures website, or from the controllers manufactures site. This T500 has a Intel ICH9M/M-E 2 port Serial ATA storage controller. I downloaded the drivers from Lenovo's website, extracted the drivers from the setup form that it came in, and then created a driver package in ConfigMgr that contained only the storage drivers.

You now need to discover the Hardware ID information for your controller. There are two ways I'm aware of to do this.
  1. The first way is to boot to WinPE with command support enabled and then look in WMI for the information. I do this by mapping a drive in WinPE to a share where I have an application I launch that allows me to browse WMI. Once in WMI you can navigate to Win32_PnPEntity to find the information. You have to dig a bit though with this method.
  2. The second way is to boot into the OS, then go to Device Manager, expand IDE ATA/ATAPI controllers, find the storage controller, go into it's properties and grab the Device ID that way. 
It's very important that you grab the full name of the full name of the storage controller. You may see multiple Device ID's, however you only need the beginning of the ID. Here's an example. My storage controller has the following Device ID's.
  • PCI\VEN_8086&DEV_2929&SUBSYS_20F717AA&REV_03
  • PCI\VEN_8086&DEV_2929&SUBSYS_20F717AA
  • PCI\VEN_8086&DEV_2929&CC_01018A
  • PCI\VEN_8086&DEV_2929&CC_0101
 The only part of the Device ID that you need is the beginning which contains the manufacturer code, and the device code. For me, that part is PCI\VEN_8086&DEV_2929.

Now that we have both the full name of the controller, the Device ID, and the controller drivers imported into a driver package in ConfigMgr, we can setup our Task Sequence.

In your task sequence you need to add an Apply Driver Package step right after the Auto Apply Drivers step. In my case, I've actually created a sub folder that contains all the storage drivers, that way it's more organized.  It's also probably best if you rename the step to whatever the controllers name is.

In the properties of the Apply Driver Package step, you'll have to go through the drop downs until you find the correct driver for your controller. If you pick the wrong one, the XP mini setup will blue screen and fail.

You now need to add a WMI condition to the Driver Package step. In my case, my WMI query is
SELECT * FROM Win32_PnPEntity WHERE DeviceID like 'PCI\\VEN_8086DEV_2929%'

This will make it so that ConfigMgr only applies the driver package when the specific controller is present.

Now that you've done all this, you should be able to image your computer without injecting the controller drivers directly into the XP Source files first. In my case, this is going to save me lots of time. 

Prevent reboot after Office 2007 + installation

Here's a cool tip I found. You can prevent Office 2007 and 2010 setup from wanting a reboot by doing the following.

(This is assuming that you're using a MSP file for an automated installation by the way...)

First go into the Office Customization Tool and open up an existing MSP or configure a new one. To prevent a reboot however to the the "Modify Setup properties" section, then add a property named "SETUP_REBOOT" and give it a value of "Never". (the property name must be in caps)

By doing this your better able to control the outcome of your automated installation. In my case, my automated Office 2010 beta installation would reboot for some people, and then not for others. That made it difficult to use ConfigMgr because of the reboot properties for the task. By adding this property to the setup and knowing that setup will never reboot by itself, I can just have the ConfigMgr install task prompt the user for a reboot, therefore cleaning up the rebooting of the installations as well.


Here's a link to MS that shows more info on setup properties.
http://technet.microsoft.com/en-us/library/cc179018.aspx

Thursday, April 8, 2010

Managing the dns suffix search order with a script

Recently I ran into an issue where I needed to use a script to change the DNS Suffix search order on multiple Windows XP machines instead of using a GPO (which is the preferred way).

Prior to running the script, this is what you would see when you went to the DNS tab on the Advanced section of the properties for TCP/IP on your network adapter.

Here is what happens after you run the script.

Below is the VBS script. You can easily use ConfigMgr to deploy the script.

On Error Resume Next
 
strComputer = "."
arrNewDNSSuffixSearchOrder = Array("domain1.com", "domain2.local")
 
Set objWMIService = GetObject("winmgmts:" _
 & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colNicConfigs = objWMIService.ExecQuery _
 ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
 
For Each objNicConfig In colNicConfigs
  strDNSHostName = objNicConfig.DNSHostName
Next
 
Set objNetworkSettings = _
 objWMIService.Get("Win32_NetworkAdapterConfiguration")
intSetSuffixes = _
 objNetworkSettings.SetDNSSuffixSearchOrder(arrNewDNSSuffixSearchOrder)
 
 
Set colNicConfigs = objWMIService.ExecQuery _
 ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
For Each objNicConfig In colNicConfigs

    Next