Oct 22, 2010

How to remove and rebuild a SMS 2003 (SCCM 2007) secondary site

To manually stop and remove the failed secondary site, follow these steps:
  1. Click Start, point to All Programs, point to Systems Management Server, and then click SMS Administrator Console.
  2. Locate the Site Settings\Addresses subtree.
  3. Right-click the address for the failed secondary site, and then click Delete.
  4. To use the Preinst.exe tool on the SMS parent site to delete the failed secondary site from the database, follow these steps: 
  5. On the SMS primary site (parent) computer, click Start, and then click Run.
  6. Type cmd in the Open box, and then click OK.
  7. At the command prompt, type cd\, and then press the ENTER key.
  8. Type cd sms\bin\i386\00000409, and then press the ENTER key.
  9. Type Preinst /DELSITE SiteCode ParentCode, and then press the ENTER key.

    NoteSiteCode is the site code of the secondary site, and ParentCode is the site code of the parent site.
  10. To remove any pending or active jobs to a site, type Preinst /DELJOB SiteCode , and then press the ENTER key.

    NoteSiteCode is the site code of the secondary site. For more information about how to use the PREINST tool, click the following article number to view the article in the Microsoft Knowledge Base:
    212978  (http://support.microsoft.com/kb/212978/ ) Description of Preinst.exe for Systems Management Server 2.0
  11. To make sure that the secondary site is completely removed, follow these steps:
    1. Make sure that no SMS or Winmgmt services are running on the computer, including the SMSBootstrap service. If these services are running, stop the services, and then change the Startup type to Manual.
    2. Use Registry Editor to make sure that the following SMS registry keys are removed:
      • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS
      • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NAL
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SMS_Executive
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SMS_Site_Component_Manager
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SMS_Bootstrap
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CLISVC
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SMS_Discovery_Data_Manager
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SMS_Lan_Sender
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SMS_Scheduler
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SMS_Site_Backup
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SMS_Software_Metering_Processor
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SMS_Status_Manager
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_CLISVC
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_SMS_BOOTSTRAP
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_SMS_EXECUTIVE
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_SMS_HARDWARE_INVENTORY_AGENT_SERVICE
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_SMS_KEY_CREATION_SERVICE
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_SMS_SERVER_BOOTSTRAP_servername
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_SMS_SITE_COMPONENT_MANAGER
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\SMS Client
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\SMS Performance Data Provider
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\SMS Provider
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\SMS Remote Control
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\SMS Server
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\SmsClient
    3. Make sure that the following folders are removed:
      • X:\SMS
      • X:\SMSBootstrap.log
      • X:\SMSBootstrap.ini
      • X:\SMSBootstrap.pkg
      • %Winnt%\MS\SMS
      NoteX is the SMS installation drive.

      Note You may have to restart the computer to remove some of these files and folders.
    4. Make sure that the CAP_SiteCode and SMSPKGdrive$ shares and their corresponding folders are deleted from the client access point computers.

      NoteSiteCode is the site code of the secondary site, and drive is the drive letter.
    5. Make sure that any site-specific accounts or groups are deleted, including the SMS_SiteSystemToSiteServerConnection_sitecode and SMS_SiteToSiteConnection_SiteCode groups.

      NoteSiteCode is the site code of the secondary site.
    6. Remove the following objects from Internet Information Services (IIS) Manager (if they exist).

      Under Application Pools (only on IIS 6.0):
      • CCM Server Framework Pool
      • SMS Distribution Points Pool
      • SMS Management Point Pool
      • SMS Server Location Point Pool
      Under the default Web Site (on IIS 5.0 or IIS 6.0):
      • CCM_Incoming
      • CCM_Outgoing
      • CCM_System
      • SMS_DP_
      • SMS_MP
      • SMS_SLP
    7. Restart the server.

      Note The server must be restarted to make sure that any of the SMS services that you deleted from the registry in step 6b are no longer running. If these services are still running when you try to reinstall the secondary site, the Setup program will try to remove these services, but the removal will fail because they are already gone from the registry.
After these items are removed, you can reuse the site code to reinstall the secondary site.

How to rebuild the secondary site

  1. Reinstall the secondary site. As soon as possible, the secondary site installation should be started to minimize the effect on clients.

    To speed the installation, see the "Installing a Secondary Site Using SMS Setup" topic in the SMS 2003 Deployment Guide . To obtain this guide, visit the following Microsoft Web site:
    http://technet.microsoft.com/en-us/library/cc181264.aspx (http://technet.microsoft.com/en-us/library/cc181264.aspx)
    This section explains how to set up the site directly from the CD-ROM. This step lets you bypass the 76 megabyte (MB)-network installation package and to install directly from the CD-ROM.

    Important If you use Standard security, verify that the correct accounts and passwords have been specified. Problems can be very difficult to diagnose and repair and may require that you repeat the procedure. To make sure of success, test the account beforehand. To do this, log on to the new primary site by using the specified account, and then connect to the secondary site's c$, d$, and admin$ shares. Create, read, and write to folders and files from the secondary site drives to the primary site drives and back again.
  2. Reconfigure the secondary site. Immediately after you install the secondary site and while the site configuration update is being propagated to the parent site, use the SMS Administrator MMC to configure settings that will prevent clients from having to unnecessarily change their configuration.

Error 0x80131107, Trying to install Microsoft .NET Framework 2.0

  1. Download the .NET Framework cleanup tool and choose to clean up the version of the .NET Framework that is causing problems on your system
  2. Download and install the version of the .NET Framework that you cleaned up in step 1 (such as the .NET Framework 1.0, .NET Framework 1.1 or .NET Framework 2.0)
  3. (optional) Download and run the .NET Framework verification tool to double-check that all .NET Framework files are correctly installed
  4. Download and install the desired .NET Framework service pack (such as .NET Framework 1.0 SP3 or .NET Framework 1.1 SP1) by running the setup package directly instead of using Windows Update.  Running it directly will allow the service pack setup to display error dialogs instead of having Windows Update suppress them

Oct 21, 2010

Duplicate PC's or GUIDS in my SCCM (ConfigMgr)

Have you ran across where you keep seeing PC's show up in your Collections with duplicate names and every time you update and refresh the collection you'll see a different set of PC's show duplicates.
Sample
 DuplicatePC
I was seeing this happen while at a customer and it turned out they imaged a machine with ghost and then used that image over and over and over. Well, if they don't prep that machine correctly with sysprep and the have the SCCM or SMS client already installed, this will cause a problem that you could be tracking down for days.


To resolve this issue, let's see how many duplicates you have. Create a collection and add the following 3 queries as part of the collection. Then update and refresh your collection.
Query 1
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,
SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,
SMS_R_SYSTEM.Client from SMS_R_System where ClientVersion = "2.50.4160.2000" or Client is NULL
Query 2
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,
SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,
SMS_R_SYSTEM.Client from SMS_R_System join SMS_G_System_System on
SMS_R_System.ResourceID = SMS_G_System_System.ResourceID where
SMS_R_System.Name <> SMS_G_System_System.Name
Query 3
select SMS_R_System.ResourceID,SMS_R_System.ResourceType,SMS_R_System.Name,
SMS_R_System.SMSUniqueIdentifier,SMS_R_System.ResourceDomainORWorkgroup,
SMS_R_System.Client from SMS_R_System where SMS_R_System.ResourceID 
in (select SMS_GH_System_System.ResourceID from SMS_G_System_System
join SMS_GH_System_System on SMS_G_System_System.ResourceID =
SMS_GH_System_System.ResourceID where SMS_G_System_System.Name <>
SMS_GH_System_System.Name)
Now you should have a list of machines showing duplicate GUIDS in your database. Just FYI, this isn't always the most accurate, but this allows you a starting place to attach the problem.
Next let's start attacking the problem, you know everyone has to start somewhere.
  1. Create some scripts to fix this issue
  2. Now create these batch files:
    • "CallFinalProcess.bat"
                         Call FinalProcess.bat
                    Call FinalProcess.bat
                    Call FinalProcess.bat
                    Etc….
    • "FinalProcess.bat"
      echo starting the FixMyGuid batch file 1copy /Y D:\DATA\Package$\FixMyGUID\fixmyguid.bat \\%1\c$.\PSTools\psexec -accepteula \\%1 -u deops\ -p /s c:\fixmyguid.bat
    • "FixMyGuid.bat"
      @echo off
      echo starting the FixMyGuid batch file 2
      echo copy sleep.exe file
      copy /Y \\\package$\FixMyGUID\sleep.exe %windir%
      sleep 10 /quiet
      echo copy tranguid.exe file
      copy /Y \\\package$\FixMyGUID\tranguid.exe %windir%
      rem sleep 10 /quiet
      echo copy CCMDelCert.exe file
      copy /Y \\\package$\FixMyGUID\CCMDelCert.exe %windir%
      sleep 10 /quiet
      echo running CCMDelCert to repair GUID
      %windir%\CCMDelCert.exe
      sleep 10 /quiet
      net stop ccmexec
      net start ccmexec
      rem
      rem @echo rebooting workstation in 20 seconds
      rem \\ name>\package$\FixMyGUID\Pstools\PSSHUTDOWN -r -f \\ name>
  3. Now you have the Duplicate GUIDS collection created. Downloaded the files required to reset the GUIDS in the SMSCFG.INI file and created the scripts to download certain files and run exe's on the workstation to resolve the issue. What I would have liked to add is the last scripts a command to restart the workstation. If your calling the script and you know that no one is on that pc, you can remove the REM commands at the end. We're nearing the end of the process, we need do the following to prepare for deployment.
    • Go to SCCM Reports and run report #130 from the Duplicate GUIDS collection.
    • Export the list to a CSV file and clean the file up.
    • Then add "Call FinalProcess.bat" before the computer name as shown in #2.
    • Copy and Paste the list to the CallFinalProcess.bat file
    • Open a CMD Prompt and run CallFinalProcess.bat file form the server.
  4. On average you'll have to give the machines at least 5 minutes to update before you'll see the difference on SCCM. Nothing will hurt if you would like to update and refresh the Duplicate GUID collection. Also, you may have to run the process several times throughout a week or more since some laptops will be disconnected or not turned on.

Oct 20, 2010

Duplicate SCCM Client GUIDs / Full Client Reinstall

This was an issue that I came across from our recent upgrade from SMS 2003 to SCCM 2007.  While we were still using SMS, some systems had been cloned/p2v’d from a production system to a virtual then renamed.  It wasn’t caught at the time, but it appears SMS may have been unable to automatically give the cloned SMS clients a new GUID.  When we migrated to SCCM, these clients were fighting over which of them was the real and live system in SCCM, such that some client records would suddenly disapper from the console…then if they’re client was fixed, a different client record would disappear.
However, simply uninstalling/reinstalling the SCCM client was not resolving the issue.  After some digging around, I found a couple of utilities to help rip out the SCCM client and force a new GUID to be assigned.  I brought these utilities together and created a simple executable to coordinate the process.  This was created with the old, but very reliable, SMS Installer, the code below is for that, but can easily be rebuilt as a vbscript.
If you have any questions about this process, feel free to leave me a comment and I can respond!


  1. On your computer, download and install the SMS 2003 Toolkit v2
  2. In the directory containing your SCCM client install, create a subdirectory (such as “SOURCE”)
  3. From the Toolkit directory, copy ccmdelcert.exe and tranguid.exe to the newly created subdirectory in previous step
  4. In the SCCM client install directory, create an executable or script that does the following in order
    • Execute ccmdelcert.exe (wait for process termination)
    • Delete the file %WINDIR%\SMSCFG.ini
    • Execute ccmsetup.exe /uninstall (wait for process termination)
    • Delete directory %WINDIR%\system32\ccm\
    • Delete registry key HKLM\SOFTWARE\Microsoft\CCMSetup
    • Delete registry key HKLM\SOFTWARE\Microsoft\SMS
    • Execute ccmsetup.exe (wait for process termination)
Below is the ‘code’ for the SMS Installer executable that I built to facilitate this.
Document Type: IPF
item: Check Disk Space
end
item: Set Variable
  Variable=ROOT
  Value=C:
end
item: Get Environment Variable
  Variable=WINDIR
  Environment=WINDIR
end

Oct 19, 2010

Opalis: common errors while deploying an action server

in this post, I'm capturing a list of error messages as I run across them and documenting the problem.

error 2147023293 :: [0x80070643] :: fatal error during installation

this first one is a requirements issue.  however, you can't see it while you're deploying it.  as you can see below, the installation results in a failure.
image
checking the logs, it doesn't produce anything of further value.
2010\10\04 22:38:49.420 [0x80070643] <E> Error deploying Action Server to OPALIS2:

- _com_error "Fatal error during installation." "" "-2147023293"
 
however, when you check the logs on the action server you're deploying to, it becomes very evident why the installation failed to succeed (as highlighted below).
 === Logging started: 10/4/2010 17:38:47 ===
MSI (s) (C8:C0) [17:38:47:171]: Note: 1: 2262 2: PatchPackage 3: -2147287038 
MSI (s) (C8:C0) [17:38:47:202]: Machine policy value 'DisableRollback' is 0
MSI (s) (C8:C0) [17:38:47:218]: User policy value 'DisableRollback' is 0
MSI (s) (C8:C0) [17:38:47:249]: PROPERTY CHANGE: Adding UILevel property. Its value is '2'.
MSI (s) (C8:C0) [17:38:47:280]: PROPERTY CHANGE: Adding ACTION property. Its value is 'INSTALL'.
MSI (s) (C8:C0) [17:38:47:311]: Doing action: INSTALL
Action start 17:38:47: INSTALL.
MSI (s) (C8:C0) [17:38:47:374]: Running ExecuteSequence
MSI (s) (C8:C0) [17:38:47:405]: Doing action: LaunchConditions
Action start 17:38:47: LaunchConditions.
This product requires Microsoft .Net 2.0 or higher.
MSI (s) (C8:C0) [17:38:47:483]: Product: Opalis Integration Server - Action Server -- This product requires Microsoft .Net 2.0 or higher.
Action ended 17:38:47: LaunchConditions. Return value 3.
Action ended 17:38:47: INSTALL. Return value 3.
=== Logging stopped: 10/4/2010 17:38:47 ===
if you can get away with installing .net framework 3.5, you might as well.  it will most likely be necessary in 6.3.

error 2147221164 :: [0x80040154] :: unable to connect to the remote machine

though this shows up in the console, it's also evident in the OISMC* logs.  here's what you may find:
2010\10\04 20:44:34.619 [0x80040154] <E> Error deploying Action Server to OPALIS2:

- Unable to connect to the remote machine with the OpalisRemotingService
- Cannot connect to the Escorter service on the remote machine
- Cannot instantiate "RemoteEscorter"
- _com_error "Class not registered" "" "-2147221164"
generally in this scenario, it's because of a deployment targeting an unsupported operating system.  usually this occurs because the operating system is x64 which is not supported until 6.3.  this blog post from the opalis team lists the new, supported platforms: http://blogs.technet.com/b/opalis/archive/2010/08/12/what-s-coming-in-the-next-opalis-release.aspx
this applies to deployment of the client console as well.

error [0x80070569] :: user account specified does not have rights

I'm not sure this actually requires explanation.  just make sure the account you're using for the install has the "log on as a service" permission.
2010\10\05 13:43:54.229 [0x80070569] <E> Error deploying Action Server to OPALIS2:

The user account specified for the Action Server does not have the "Log on as a service" user right granted. Please specify a user account with the proper rights or add the right to the account that was specified.
 
image

Opalis: Installation Video Tutorial Series

Charles Joy has made some great video’s showing how to install Opalis. Not only the easiest parts are shown but also the more challenging one, the installation of the Operator Console.
Enjoy. Video tutorial series to be found here.
image

Opalis: QIK Video Tutorial Series

QIK, also known as Opalis Quick Integration Kit is the Opalis equivalent of the SDK. Charles Joy has made a nine series video tutorial about how to use QIK in order to  create QIK projects using the QIK CLI and QIK SDK.
Series to be found here.
image