Get OS type(x32 or x64) information from SCCM report


select sys.netbios_name0,
case when PROCESSOR.addresswidth0 = 64 then '64bit OS'
when PROCESSOR.addresswidth0=32 then '32bit OS'
end as [Operating System Type],
case when PROCESSOR.addresswidth0=32 and PROCESSOR.DataWidth0=64 then '*'
end as [32-bit OS on x64 processor]
from v_r_system sys
join v_gs_processor PROCESSOR on sys.resourceid=PROCESSOR.resourceid


All credits to Sherry Kissinger's. Read the original article at - http://myitforum.com/cs2/blogs/skissinger/archive/2009/06/23/32bit-vs-64bit-report.aspx

SCCM Client does not show up in console

Today, I come across a client which was not showing in the SCCM console and when I looked at the ccmexec.log I noticed the following error logs. 

ccmexec.log: 


[CCMHTTP] HTTP ERROR: URL=http://sccmserver.abc.com/ccm_system/request, Port=443, Protocol=https, SSLOptions=1, Code=12029, Text=ERROR_WINHTTP_CANNOT_CONNECT
HandleRemoteSyncSend failed (0x80040231).
CForwarder_Sync::Send failed (0x80040231).
CForwarder_Base::Send failed (0x80040231).

Resolution
Make sure the required port are opened on the firewall. In my case it was 443 and port 80 once they are opened my ConfigMgr client shown up with in 15-20 minutes in the SCCM console. 

Adds support for Windows 8-based client computers in SCCM 2007 SP2


Microsoft has released a hotfix KB2750782 to add support for Windows 8-based client computers in System Center Configuration Manager 2007 SP2. Please refer to the following link for more information on this hotfix and how to apply it. 

http://blogs.technet.com/b/configmgrteam/archive/2012/10/31/update-on-windows-8-and-windows-server-2012-support-in-cm-and-ep.aspx
http://support.microsoft.com/kb/2750782
http://blogs.technet.com/b/configurationmgr/archive/2010/12/09/system-center-configuration-manager-2007-hotfix-installation-guidance.aspx 

How to install KB2750782 HOTfix to SCCM 2007 SP2 Central/Primary Site.

Download the hotfix from here and extract and run "SCCM2007-SP2-KB2750782-ENU.msi".


Follow the hotfix wizard to complete the installation. 





You get prompted if you want it to create an SCCM package to deploy 2750782 to the clients.  If you say Yes, then it saves you the time to create the package (and the SCCM program) yourself.  It also creates the file used to install the hotfix on the clients to a subfolder nested in the location where the SCCM client installation files are on the site server.  The location is
\\<siteserver>\sms_<sitecode>\client\i386\hotfix\KB2750782, and the file is
 sccm2007ac-sp2-kb2698619-x86-enu.msp.











Applying hotfixes to Configuration Manager 2007 Clients


1. In the Configuration Manager console, create a new package. The "Package Properties" dialog box appears. In the Name box on the General tab of the Package Properties dialog box, provide a name that  describes it as a hotfix for the ConfigMgr client and identifies the ID number of the
associated Knowledge Base article.

2. In the "Package Properties" dialog box, on the "Data Source" tab, in the "Source directory" box, specify the folder where the hotfix was installed by the hotfix installer. The default location is:

\\<siteserver>\sms_<sitecode>\client\<platform>\hotfix\<updateid>

Where: 
<siteserver> is the name of the ConfigMgr site server
<sitecode> is the site code of the site
<platform> is the processor type, e.g. I386
<updateid> is the ID number of the associated Knowledge Base article
==========================================
Example:

\\Server1\SCCM_123\client\I386\hotfix\KB2750782

Additionally, to ensure accurate status is reported back for the application of
the client hotfix, the MIF file name(SMSAdvancedClient.sccm2007ac-sp2-kb2698619-x86-enu.mif) must be specified in the "MIF file name" field of the Reporting tab.  

Alternatively, you could use the following product code in the "Name" field. 

{6D2F87F7-4B2D-491E-8781-FF359FD95243}.

Because the application of this hotfix on a client computer stops and restarts
the SMS Agent Host service, it cannot monitor for an exit code from the update and must rely on finding a matching status MIF after the service is restarted. If a matching MIF is not found, the status will be reported to ConfigMgr as a failure (1603) even though the update may have completed successfully.


3. Click "OK" to accept the other default  package settings.

4. Under the new package, create a new  program. The "Program Properties" dialog box appears. On the "General" tab, in the "Name" box, enter a name that describes it as a hotfix for the Configuration Manager client.

5. In the "Program Properties" dialog box, on the "General" tab, in the "Command line" box, specify the following:

Msiexec /p <filename> /L*v <logfile> /q REINSTALL=ALL REINSTALLMODE=mous

Where: <filename> is the file name of the .msp file provided with the hotfix  package. Typically, the file name is in the form:

SCCM2007AC-<articleID>-<platform>.msp  <logfile> is the path where the results should be logged.

Example:
msiexec.exe /p sccm2007ac-sp2-kb2698619-x86-enu.msp /L*v %TEMP%\sccm2007ac-sp2-kb2698619-x86-enu.msp.LOG /q REINSTALL=ALL REINSTALLMODE=mous

Specify for the program to run minimized and set the "After running" option to Program restarts computer.

6. In the "Program Properties" dialog box,  on the "Requirements" tab, set the "Maximum allowed run time" to 20 minutes. This will prevent the installation from blocking other software distributions if a problem occurs.

7. In the "Program Properties" dialog box,  on the "Requirements" tab, choose the operating system version on which you want to install the client hotfix.

8. In the "Program Properties" dialog box,  on the "Environment" tab, select program can run "Whether or not a user is logged on."

9. Click "OK" to accept the other default  program settings.

10. Under the new package, select  distribution points for the new package.

11. In the Configuration Manager console, create a new query to identify systems that need the .msp. This is a sample query that you can adapt to your environment:

select *  from  SMS_R_System inner join SMS_G_System_SMS_ADVANCED_CLIENT_STATE on SMS_G_System_SMS_ADVANCED_CLIENT_STATE.ResourceID = SMS_R_System.ResourceId where SMS_R_System.ClientType = 1 and SMS_G_System_SMS_ADVANCED_CLIENT_STATE.Name = "CcmFramework" and (SMS_G_System_SMS_ADVANCED_CLIENT_STATE.Version < "4.0.6487.2196")

When you apply the hotfix the component version of some components changes, you can create a dynamic collection based on this data using the above query. 


12. Create a collection based on the query  that you created in step 11. Limit this query to a pilot group of systems.

13. In the Configuration Manager console, create a new advertisement. The
"Advertisement Properties" dialog box appears. On the "General" tab, in the
"Name" box, enter a name that describes it as a hotfix for the Configuration Manager client.

14. In the "Advertisement Properties" dialog box, on the "General" tab,
select the package that you created in step 1, the program that you created in
step 4, and the pilot collection that you created in step 12.

15. In the "Advertisement Properties" dialog box, on the "Schedule" tab, create a new mandatory assignment. Assign it to run more frequently than your hardware inventory collection schedule. For example, if your hardware inventory is collected once per week, use a schedule more frequent  than once per week. This will ensure that the hardware inventory that includes the ConfigMgr client version information is up to date.

16. Click "OK" to accept the other default advertisement settings.

17. Test the hotfix deployment to the pilot group.

18. When the pilot deployment is successful, expand the target to deploy
to all the clients that require the hotfix.

To deploy the ConfigMgr client .msp by using a method other than ConfigMgr software
distribution:

Use the following command line:

Msiexec /p <filename> /L*v <logfile> /q REINSTALL=ALL REINSTALLMODE=mous

Where: <filename>  is the file name of the .msp file that is provided with the  hotfix package. Typically, the file name is in the form:

SCCM2007AC-<articleID>-<platform>.msp

<logfile> is the path where the results hould be logged

Example:

msiexec.exe /P sccm2007ac-sp2-kb2698619-x86-enu.msp /L*v %temp%\sccm2007ac-sp2-kb2698619-x86-enu.log /q REINSTALL=ALL REINSTALLMODE=mous 

SCCM Client version number changes after you install the hotfix on the SCCM client. 


Download makecoll.exe to create static collections

The makecoll.exe which was included with SMS 2.0 is no longer available with SMS 2003/SCCM 2007 and 2012.
I created a similar collection creator tool which can be downloaded from
http://smstools.codeplex.com/

SCCM Client installation fails with "The current OS is not supported" message in ccmsetup.log


Issue:
CCMSETUP.LOG:

DetectWindowsEmbeddedFBWF() Detecting OS Version
Client OS Version is 6.1, Service Pack Version 0
Client OS is not a supported Windows Embedded Platform
The current OS is not supported.

Resolution:

Make sure "Background Intelligent Transfer Service" is installed. If it not listed in the services, then 
1) run sfc /scannow
2) Open admin command prompt and run SC Create BITS binpath= "c:\windows\system32\svchost.exe -k netsvcs" start= delayed-auto. Then either restart, or go into Services (run: services.msc) and restart it yourself
3) Once the service is started, re-attempt the SCCM client installation. 

MP does not start and mpcontrol.log shows error code 0x8004100e


MPControl.log: 
CWmi::Connect(): ConnectServer(Namespace) failed. - 0x8004100e
CMPControlManager::WriteToCCMSettings(): pWmi->Connect() failed - 0x8004100e
STATMSG: ID=5432 SEV=E LEV=M SOURCE="SMS Server" COMP="SMS_MP_CONTROL_MANAGER" SYS=server123.abc.com SITE=LAB PID=2060 TID=4292 GMTDATE=Mon Nov 26 20:38:52.423 2012 ISTR0="" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0
MPStart(): WriteToCCMSettings() failed - 0x8004100e
SMS_MP_CONTROL_MANAGER failed to start with 0x8004100e

resolution: 

Make sure the SCCM client(SMS Agent Host) service is up and running and the client is working properly. 

List of Public KB Articles and Hotfixes for Configuration Manager 2007 SP2

How to easily create a direct membership collection using another collection

We can very easily create a static collection by using a makecoll.exe, but this tool does not have an option to  add more systems to an existing collection. It might take lot time and require manual efforts to add a large list of systems to an existing static collection(direct membership).  The following tip might help you quickly add list of systems to an already existing collection....

1) Right click on the collection on which you like to add a list of systems that are available in another collection(source collection). Select Properties. 
2) Click on Membership Rules tab and click Next.
3) Click on Computer icon to start the Create Direct Membership Rule Wizard.
4) In the Search Resources wizard. 
    Select Resource Class: System Resources
    Select Atribute Name: Netbios Name
    in Value: type '%'




5) Click on next. 
6) In the "Collection Limiting" wizard, in the search in this collection: type the your source collection name and click next. 

7) select the required computers and click Next. 

8) Follow the wizard to complete it. 

Get Number Of Cores and Logical Processors information in SCCM


The default reporting in System Center Configuration Manager (SCCM) does not track the Number of Cores and Number of Logical Processors for each processor.The Win32_Processor WMI class contains number of cores (NumberOfCores) and logical processors (NumberOfLogicalProcessors) for each processor. It displays a unique DeviceID for each physical process in the system. This information is only available in newer version of OS's like Vista, Windows 7, Windows 2008, etc. For older version of OS like windows XP and Windows 2003 hotfix are available from Microsoft to populate this information in WMI


Windows XP SP2: http://support.microsoft.com/kb/936235
Windows 2003 SP1 or SP2: http://support.microsoft.com/kb/932370/en-us

The value for NumberOfLogicalProcessors will be higher than the value for NumberOfCores if the processor supports hyperthreading, which effectively splits a core into two logical processors. The challenge is that the reporting on Win32_Processor isn't enabled in the default sms_def.mof.

You can look at the information available in Win32_Processor WMI class using the following VB Script. 

OnErrorResumeNext
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor",,48)

Dim objItem 'as Win32_Processor
ForEach objItem in colItems
    WScript.Echo "AddressWidth: " & objItem.AddressWidth
    WScript.Echo "Architecture: " & objItem.Architecture
    WScript.Echo "Availability: " & objItem.Availability
    WScript.Echo "Caption: " & objItem.Caption
    WScript.Echo "ConfigManagerErrorCode: " & objItem.ConfigManagerErrorCode
    WScript.Echo "ConfigManagerUserConfig: " & objItem.ConfigManagerUserConfig
    WScript.Echo "CpuStatus: " & objItem.CpuStatus
    WScript.Echo "CreationClassName: " & objItem.CreationClassName
    WScript.Echo "CurrentClockSpeed: " & objItem.CurrentClockSpeed
    WScript.Echo "CurrentVoltage: " & objItem.CurrentVoltage
    WScript.Echo "DataWidth: " & objItem.DataWidth
    WScript.Echo "Description: " & objItem.Description
    WScript.Echo "DeviceID: " & objItem.DeviceID
    WScript.Echo "ErrorCleared: " & objItem.ErrorCleared
    WScript.Echo "ErrorDescription: " & objItem.ErrorDescription
    WScript.Echo "ExtClock: " & objItem.ExtClock
    WScript.Echo "Family: " & objItem.Family
    WScript.Echo "InstallDate: " & objItem.InstallDate
    WScript.Echo "L2CacheSize: " & objItem.L2CacheSize
    WScript.Echo "L2CacheSpeed: " & objItem.L2CacheSpeed
    WScript.Echo "L3CacheSize: " & objItem.L3CacheSize
    WScript.Echo "L3CacheSpeed: " & objItem.L3CacheSpeed
    WScript.Echo "LastErrorCode: " & objItem.LastErrorCode
    WScript.Echo "Level: " & objItem.Level
    WScript.Echo "LoadPercentage: " & objItem.LoadPercentage
    WScript.Echo "Manufacturer: " & objItem.Manufacturer
    WScript.Echo "MaxClockSpeed: " & objItem.MaxClockSpeed
    WScript.Echo "Name: " & objItem.Name
    WScript.Echo "NumberOfCores: " & objItem.NumberOfCores
    WScript.Echo "NumberOfLogicalProcessors: " & objItem.NumberOfLogicalProcessors
    WScript.Echo "OtherFamilyDescription: " & objItem.OtherFamilyDescription
    WScript.Echo "PNPDeviceID: " & objItem.PNPDeviceID
    WScript.Echo "PowerManagementCapabilities: " & objItem.PowerManagementCapabilities
    WScript.Echo "PowerManagementSupported: " & objItem.PowerManagementSupported
    WScript.Echo "ProcessorId: " & objItem.ProcessorId
    WScript.Echo "ProcessorType: " & objItem.ProcessorType
    WScript.Echo "Revision: " & objItem.Revision
    WScript.Echo "Role: " & objItem.Role
    WScript.Echo "SocketDesignation: " & objItem.SocketDesignation
    WScript.Echo "Status: " & objItem.Status
    WScript.Echo "StatusInfo: " & objItem.StatusInfo
    WScript.Echo "Stepping: " & objItem.Stepping
    WScript.Echo "SystemCreationClassName: " & objItem.SystemCreationClassName
    WScript.Echo "SystemName: " & objItem.SystemName
    WScript.Echo "UniqueId: " & objItem.UniqueId
    WScript.Echo "UpgradeMethod: " & objItem.UpgradeMethod
    WScript.Echo "Version: " & objItem.Version
    WScript.Echo "VoltageCaps: " & objItem.VoltageCaps
    WScript.Echo ""
Next

To enable this class reporting in SCCM, the guidelines to update sms_def.mof can be found at this MyITForum post. Aditional information about the Win32_Processors call can be found  here.