Monday, July 19, 2010

Installing Exchange System Manager for Exchange 2003 on Windows 7

This morning my colleague decided that he wanted to upgrade his XP machine to Windows 7. Other than myself, no one else on the support team had Windows 7, so the need to have Exchange 2003 tools integrated into Windows 7 wasn't there until this morning. ( I always remoted into a Windows XP machine or into the server.)

So after looking into how to get Exchange 2003 tools on a Windows 7 machine, I came up with this.

  1. Download the "Exchange System Manager for Windows Vista"
    (http://www.microsoft.com/downloads/details.aspx?familyid=3403d74e-8942-421b-8738-b3664559e46f&displaylang=en)
  2. On the Windows 7 machine, go to Control Panel -> Programs and Features -> Turn Windows features on or off -> Expand Internet Information Services -> Expand Web Management Tools and then install all of the IIS 6 Management Compatibility tools.
  3. Open Command Prompt on the Windows 7 machine as an Administrator and navigate to where you stored ESMVISTA.msi. 
  4. Run "ESMVISTA.msi /q"
  5. You should now be able to open up the properties on a user account through the ADUC and see your exchange tabs.

Monday, June 28, 2010

Automatic Activation of Office 2010

If you're using a MAK key for Office 2010, you'll have the problem where after Office is installed on a machine the first user who uses it will be prompted to activate online. To prevent this from happening do the following.

In the custom MSP file, go to the "Add installations and run programs section", then click Add. In the "Target" field put in "[SystemFolder]\cscript.exe" (without the quotes) and then in the Arguments field put in "C:\Program Files\Microsoft Office\Office14\ospp.vbs" /act (quotes included) Make sure you have "Run this program after the Office product has been installed" checked and you're good to go.

Automatic Activation of Windows 7/Server 2008

The following will automatically active a Windows 7 / Server 2008 OS during the imaging process.

Create a Run Command Line task and run "SLMGR.VBS -ato" from the %systemroot%\system32 directory.

As long as the OS is configured to use a valid product key and has a connection to the Internet or KMS server, it will successfully activate.

Disable UAC in Windows Vista, Windows 7, Server 2008, and Server 2008 R2

Here's a registry key you can import during your task sequence that will disable the UAC in the latest version of Windows and Server.

In your task sequence insert a command line task. For the command line put in "regedit /S uac.reg", then set the start in directory to a drive that you've already mapped that has the UAC registry key in it. Place a reboot task directly after the UAC registry key is imported and after a reboot the UAC will be disalbed.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLUA"=dword:00000000

Monday, June 14, 2010

Deploying Server 2008 R2 Std via SCCM

I was asked to create a deployment for Server 2008 R2 today. I figured it would be easy as hell, however that wasn't the case. The task sequence kept throwing an error on the "Setup Windows and ConfigMgr task. Ends up it was due to the product key. After messing around with the TS over and over again, I found that if I removed the product key the TS would finish successfully. I ended up finding out that the copy of Server 2008 R2 that I got off my companies licensing site doesn't allow for a MAK key to be entered during setup. After some more searching online however I found a way to input the MAK key another way so that when the OS went to automatically activate itself it wouldn't throw an error.

What you need to do is add a Run Command Line task to your TS that comes after the OS is already installed. Put in the command line "SLMGR.VBS -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" and then tell it to start in %system root%\system32.

By doing that you're specifying a product key to be used during automatic activation.

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

Thursday, February 11, 2010

Have Windows XP run PnP scan after XP installation

If you ever have the need to have Windows XP do a PnP scan after the Windows XP installation during a task sequence, you can run the following command line.

rundll32.exe Syssetup.dll,UpdatePnpDeviceDrivers

The only thing you should be aware of is if the PnP scan detects hardware and you're missing all or part of the driver for that hardware, a pop-up asking for the driver location will halt your task sequence until you click Cancel. Or, in the case that the driver in question is your NIC, you task sequence will fail.

Thursday, January 14, 2010

Change the logon screen picture in Windows 7

Here is how to change the logon screen picture in Windows 7.

  1. First you have to enable the ability in the registry. You need to create a dword called "OEMBackground" and give it a value of 00000001.
    \HKLM\Software\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background
  2. Now you need to go to C:\Windows\System32\oobe\info\backgrounds. More than likely the directory won't exist so you'll need to create it yourself. In this directory you just need to put in a background picture you want to use. It must be named backgroundDefault.jpg and cannot be any larger than 256KB. 
Reboot to see the results.

Enjoy

Change the default user profile picture in Windows 7

The following will get you to where every user by default has a custom profile picture.

  1. You first need to go to C:\ProgramData\Microsoft\User Account Pictures and rename user.bmp to user_old.bmp.
  2. Now copy your custom picture to that directory. Make sure that it's a bmp, and it's called user. You also need to make sure that it's 128x128 pixels.
  3. Reboot the computer and the new picture will now be the default profile picture.
Here is the default profile picture that I use in my Windows 7 deployments.


Enjoy

Tuesday, January 12, 2010

"Confirm Subtree Deletion" when deleting Computer Account

So I ran into an interesting issue last week when cleaning up old computer accounts in AD. I went to delete some old Hyper-V Virtual Machine accounts and got the following error.



It ends up that Hyper-V machines include additional objects to each computer account that you can't see through Active Directory Users and Computers. I haven't looked any further into this since I don't currently have the time, but for anyone wondering, yes it's safe to click yes on this pop-up box.

Thursday, January 7, 2010

File Block Settings in Word

So here's something interesting I ran into today. A user was sent an attached MS Word Document, but was unable to open it with Word 2003, they apparently just got an error. The user then forwarded the attachment to me, and I tried opening it with Word 2010, which prompted me with a screen saying that the file type is blocked. After looking into it, it appears that the document was a Word 2 format document, and Word blocks this by default.

To unblock this you need to change the File Block Settings. To do this is Office 2007/2010, do the following...

Go to the Trust Center, then click File Block Settings, and then uncheck the checkbox for Word 2 and earlier Binary Documents and Templates.




Obviously you can use these settings for other purposes, but I just thought I would make everyone aware of it.

Enjoy