Archives for the month of: April, 2012

System Center Clients…SMH

Had a System Center client out there that would not install during a push installation.  Took a look in the ccmsetup.log file and discovered the following error: MSI: Setup was unable to create the WMI namespace CCM The error code is 80041002. Error 1603.

Quick & Easy Fix

The fix that worked for me was to…

  1. Stop the Windows Management Instrumentation service and set it to Disabled.  If you don’t disable it, it will restart automatically.
  2. Went into the %windir%\system32\wbem folder and renamed the Repository folder to Repository.old.
  3. I restarted the WMI service and set it to Automatic.
  4. I re-pushed the client from the SCCM console and everything installed just fine.

So What Brought This On?

Well we are in the process of adding a new SAN to our network at one of our locations.  The path to the roaming profile folders will need to change as a result of this.  However, we only need to make this change for a group of users at a specific location and whose roaming profile is currently pointing to the old server.

PowerShell to the Rescue!

Whenever I get the chance to write a PowerShell script, I get sorta excited about it.  Since we are still on Windows XP SP3 over here, I don’t get the chance to do a lot of cool stuff and all of our servers are not yet running Windows Server 2008 (even though we are getting there).

So I decided to write a handy script that will automate this process for me.  There are a few things to be aware of when running this script.
I ran into an issue when I attempted to run the script from a Domain Controller.  I was getting the message Set-ADUser : Insufficient access rights to perform the operation.  There must be some type of security setting or something that disallows this Active Directory editing locally.

So I tried pointing it to a server running Windows Server 2003 by using the -Server parameter but got the following message: Unable to contact the server.  This may be because this server does not exist, it is currently down, or it does not have the Active Directory Web Services running.  This would be because it’s a Windows 2003 Server Domain Controller (duh).

So I pointed it to another domain controller running Windows Server 2008 and it worked just fine.

The Script



Changes the roaming profile path of all Downtown user accounts in Active Directory to a new location.


Searches Active Directory for all users whos profiles reside on OLDNAS and changes their profile path to a share on NEWNAS


PS C:\>Change-ProfilePath-for-Downtown-Users


# Import the AD Module

Import-Module ActiveDirectory -ErrorAction SilentlyContinue

# Get credentials

$AdminCredentials = Get-Credential

# Get users from Active Directory

$Users = Get-ADUser -Filter {ProfilePath -like "\\OLDNAS\profiles*"} -Properties ProfilePath | Sort SamAccountName

# Loop through the users and change their profile paths

ForEach ($User in $Users ) {

Write-Host "Changing Profile for User:" $User .Name

$ProfilePath = "\\NEWNAS\PROFILES$\" + $User .SamAccountName

Set-ADUser $User -ProfilePath $ProfilePath -Credential $AdminCredentials -Server "lafayettedc2.citysecurities.local"


The Problem

The other day I was faced with a simple little issue to solve.  I had the Serial Number/Service Tag for a Dell server but I had no idea where it was physically located nor did I know the name of the server.  This would have not been a problem with our clients because we name our clients the same as the Service Tag.  But, our servers are named differently.

System Center Configuration Manager to the Rescue…Again!

So I decided to use SCCM reporting to solve this problem since SCCM collects all sorts of data anyway.  I created a custom report called Computers with a specific Dell ServiceTag.  The following is the SQL statement that I wrote.

SELECT SYS.Netbios_Name0, SYS.AD_Site_Name0, SYS.Operating_System_Name_and0
JOIN v_R_System SYS on SYS.ResourceID = BIOS.ResourceID
WHERE BIOS.SerialNumber0 LIKE @serialNumber
ORDER BY SYS.Netbios_Name0

  1. Click the Prompts button and add a prompt property
  2. Name: serialNumber and Prompt text: Serial Number
  3. Check the Provide a SQL statement box and enter the following:

    if (@__filterwildcard = '')
    select distinct SerialNumber0 from v_GS_PC_BIOS order by SerialNumber0
    select distinct SerialNumber0 from v_GS_PC_BIOS
    WHERE SerialNumber0 like @__filterwildcard
    order by SerialNumber0

That should do it.