Feb 1, 2011

SCCM Client Issue - Reassigning Site Code (script)

sSiteCode = "xxx"
sMachine = "."
set oCCMNamespace = GetObject("winmgmts://" & sMachine & "/root/ccm")
Set oInstance = oCCMNamespace.Get("SMS_Client")
set oParams = oInstance.Methods_("SetAssignedSite").inParameters.SpawnInstance_()
oParams.sSiteCode = sSiteCode
oCCMNamespace.ExecMethod "SMS_Client", "SetAssignedSite", oParams

'xxx - refers to site code
sMachine =MP

Jan 24, 2011

How to capture and report on a registry setting from Configuration Manager clients

This article seeks to offer a more complete solution on not only how to capture various registry settings from a client into the System Center Configuration Manager 2007 database, but to also demo how to build a sample query to report on those settings.
This sample will use a fictitious Software Application name for example purposes: "SampleAppOne"
With the following Registry Settings as an example:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\SampleAppOne]
"Description"="Sample Application One Description"
"DisplayName"="Sample Application One"
"Enable"=dword:00000001




First import the above registry settings into your test client.
Next, make backup copies of the following files before making the changes outlined below:
X:\Program Files\Microsoft Configuration Manager\Inboxes\clifiles.src\hinv\sms_def.mof
X:\Program Files\Microsoft Configuration Manager\Inboxes\clifiles.src\hinv\configuration.mof

Where X:\ is the drive where Configuration Manager 2007 is installed.
The following settings should be added at the end of the sms_def.mof
#pragma namespace (\\\\.\\root\\cimv2\\SMS)
#pragma deleteclass("SampleAppOne", NOFAIL)
[SMS_Report(TRUE),SMS_Group_Name("SampleAppOne"),SMS_Class_ID("Custom|SampleAppOne|1.0")]
Class SampleAppOne: SMS_Class_Template
{
[SMS_Report(TRUE),key] string KeyName;
[SMS_Report(TRUE)] String Description;
[SMS_Report(TRUE)] String DisplayName;
[SMS_Report(TRUE)] Uint32 Enable;
};

The following settings should be added at the end of the configuration.mof
#pragma namespace (\\\\.\\root\\cimv2)
#pragma deleteclass("SampleAppOne", NOFAIL)
[DYNPROPS]
Class SampleAppOne
{
[key] string KeyName;
String Description;
String DisplayName;
Uint32 Enable;
};
[DYNPROPS]
Instance of SampleAppOne
{
keyname="SampleAppOne";
[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\SampleAppOne|Description"),Dynamic,Provider("RegPropProv")] Description;
[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\SampleAppOne|DisplayName"),Dynamic,Provider("RegPropProv")] DisplayName;
[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\SampleAppOne|Enable"),Dynamic,Provider("RegPropProv")] Enable;
};

Once you have backed up and made the changes outlined above, Run mofcomp.exe on both the sms_def.mof and configuration.mof as follows:
%WINDIR%\System32\WBEM\Mofcomp.exe "X:\Program Files\Microsoft Configuration Manager\Inboxes\clifiles.src\hinv\sms_def.mof"
%WINDIR%\System32\WBEM\Mofcomp.exe "X:\Program Files\Microsoft Configuration Manager\Inboxes\clifiles.src\hinv\configuration.mof"

Where X:\ is the drive where Configuration Manager 2007 is installed.
Next we need to force Hardware Inventory up from a client to test and/or wait until the next scheduled Hardware Inventory is run. The changes made to the mof files on the server should start collecting the information from the client’s registry during the next Hardware Inventory Cycle.
In my testing, once the database was updated with the new tables from the custom Hardware Inventory (db0.SampleAppOne_data, history, etc...) I had to restart the SCCM 2007 Server for the mof changes to show up in the New Query as a selectable attribute. Once the tables start showing up in the SMS_Database, then restart the SCCM Server, and proceed to the next steps.
Now you can run a query from ConfigMgr 2007 Console to get a basic report showing Computer name, and a value from one of the registry keys for this computer as follows:
select SMS_R_System.Name, SMS_G_System_CUSTOM_SAMPLEAPPONE_1_0.Enable from  SMS_R_System inner join SMS_G_System_CUSTOM_SAMPLEAPPONE_1_0 on SMS_G_System_CUSTOM_SAMPLEAPPONE_1_0.ResourceId = SMS_R_System.ResourceId where SMS_G_System_CUSTOM_SAMPLEAPPONE_1_0.Enable = 1
This should return the computer names of any clients that have the registry setting Enable with a value = 1

Jan 23, 2011

The Configuration Manager Service Pack Install Guide

This document was created to help in troubleshooting Configuration Manager Service Pack 2 (SP2) install failures. This document is not entirely specific to Service Pack 2 and can apply to Service Pack 1 installs, upgrades from SMS 2003 to SCCM, and future service pack or Configuration Manager versions that rely on .mof file compilations, SQL SPNS, provider DLLs, etc.

Contents:

Section 1 Pre-Upgrade Best Practices
Section 2 General Troubleshooting
Section 3 List of Known Issues and Solutions:
A: SPN issues with SQL
B: Time Skew between remote SQL and Site Server
C: Re-Registering relevant files / errors attempting to re-register needed files.
D. Deleting Temp Files, setting Temp variables.
E. Searching for a "bad" custom or customized report
F. Checking for pre-existing duplicate reports that are new to SCCM SP2
G. Upgrade fails due to registry setting.
H. Site System does not have rights to remote SQL System or Clustered SQL Nodes
______________________________


Section 1 Pre-Upgrade Best Practices
It is important to note that some of the problems outlined below can leave your Configuration Manager or SMS installation in an unusable state (i.e. Admin Console will not launch and connect) this is because the upgraded files have already been copied to the bin\I386 directory of your SCCM installation. In some case setup may rollback successfully and in others you *may* be able to reinitiate upgrade over the top of a failed installation however in others you may have to fully restore to your previous state; SCCM RTM, SP1, SMS 2003, etc, to begin troubleshooting.
Always insure you have a complete current and full SMS or Configuration Manager backup (performed when SMS services are disabled, all directories, SQL DB, registry settings, etc..) before upgrading your product. Always utilize the testdbupgrade setup switch on a copy(!) of the site database command to insure your database can be upgraded without error. Testdbupgrade can help you insure you are ok to upgrade however you cannot upgrade a database after you have run testdbupgrade against it.
How to Test the Site Database Upgrade Process: http://technet.microsoft.com/en-us/library/bb693648.aspx
______________________________
Section 2 General Troubleshooting
Most problems we have seen thus far have been after file copy, around step 4; registering the SMS provider, and compiling .mof files. It takes setup about 10-15 minutes to get to this step. This document primarily focuses on issues of this type.
There are several things to consider in the scenario of  .MOF comp failures. First off you should not have to keep going through SP2 setup after testing solutions. Instead try to manually compile the .mof that fails. In most (not all) cases you will get an error doing this as well. Once you have implemented a solution and can manually compile the .mof file that setup was failing on, it may be safe to assume that SCCM SP2 setup can again be run and may pass this stage.
Things to look at (not necessarily in this order):
  • Relevant log files: C:\ConfigMgrSetup.log, %ConfigMgrInstallDir%\Logs\Smsprov.log and SMSProv.lo_, %Windir%\System32\Wbem\Mofcomp.log
  • Verify that DCOM and Windows Management Instrumentation (WMI) is enabled
  • Take a SQL Profiler (yes, because we are going through the Provider we do look in SQL. Specifically at the SMS_Reports table)
  • Double check WMI permissions
  • Check Security Rights in the SMS Admin console for the user that is executing the mofcomp command against smsrprt.mof
  • Verify permissions on the extnprov.dll file
  • We write .tmp files to various locations during compile. Run a Filemon.
As stated above, the files to compile during setup should be able to compile outside of setup. it is likely that you will not be able to complete setup successfully until you can compile smsrprt.mof (or whatever mof file is failing to compile) manually successfully from a command prompt.
If you try to manually compile the SMSrprt.mof and it fails you usually get the following error:
E:\SMS\bin\i386>mofcomp smsrprt.mof
Microsoft (R) 32-bit MOF Compiler Version 5.2.3790.3959
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: smsrprt.mof
MOF file has been successfully parsed
Storing data in the repository...
An error occurred while processing item X defined on lines X - X in file smsrprt.mof:
Compiler returned error 0x80041001

It may be worth noting that 0x80041001 = generic failure, so this is not helpful other than to let you know that you have not resolved your issue as of yet since you are not able to manually compile this file.
______________________________
Section 3 List of Known Issues and Solutions
The most common issue we see with SP2 upgrades is a failed to compile .mof error around the time that SP2 is trying to upgrade the SMS provider component:
<12-09-2009 15:17:37> CompileMOFFile: Starting to compile MOF C:\Program Files (x86)\Microsoft Configuration Manager\bin\i386\smsRprt.mof
<12-09-2009 15:18:11> CompileMOFFile: Failed to compile MOF C:\Program Files (x86)\Microsoft Configuration Manager\bin\i386\smsRprt.mof, error -1
<12-09-2009 15:18:11> Setup cannot compile MOF file C:\Program Files (x86)\Microsoft Configuration Manager\bin\i386\smsRprt.mof.  Do you want to continue?
<12-09-2009 15:18:11> Setup failed to install SMS Provider.  For more information about this error, see Microsoft Knowledge Base at <
http://microsoft.com> or contact Microsoft Technical Support for further assistance.
A. SPN issues with SQL:
The first thing you will want to check is that the SQL SPNs are registered correct in Active Directory. In a nutshell 2 things can go wrong here:
1. Duplicate SPNs for SQL
2. SQL is running under a Domain User account and the SPNs have not been created manually.
Resolution: Use the setspn tool.  You can find it online if it's not installed.
1. setspn -l nameofcomputerrunningsql > C:\ComputerSPN.txt
2. setspn -l domain\accountSQLisRunningUnder > C:\SQLaccountSPN.txt
3. setspn -x > C:\duplicates.txt

So if your SQL server is called sqlcomputer and the account SQL is running under is called SQLAccount number 1 and 2 above would be :
1. setspn -l sqlcomputer > C:\ComputerSPN.txt
2. setspn -l domain\sqlaccount C:\SQLaccountSPN.txt

Use the txt files above to insure SQL SPNs are registered correctly. You should have the entries listed as follows under the domain account running SQL or the actual SQL Servers computer account:
MSSQLSvc/sqlcomputer.domain.com:1433
MSSQLSvc/sqlcomputer:1433

If you are running a SQL cluster insure the same for all physical nodes and the virtual instance name.
To add a FQDN and NETBIOS SPN for SQL use the following syntax:
setspn -a MSSQLSvc/SQLcomputer.domain.com:1433 Domain\SQLaccount
and
setspn -a MSSQLSvc/SQLcomputer:1433 Domain\SQLaccount
To delete a duplicate SPN use the -d switch:
SETSPN -D MSSQLSvc/SQLcomputer:1433 Domain\SQLcomputer
You can also easily view SPNs (Service Principal Names) using ADSIEDIT.msc (install from a Windows  Server CD, \Support Tools\Suptools.msi) right click the computer or user account object and view attributes, scroll down to ServicePrincipalName.
Note: SQL creates its OWN SPN for the computer account when SQL is running under the Local System account. Having more then one SPNs registered under different accounts with the same machine name as the one SQL is running on will cause these problems as well.
Switches for SetSPN:
-R = reset HOST ServicePrincipalName
Usage: setspn -R computername
-A = add arbitrary SPN
Usage: setspn -A SPN computername
-S = add arbitrary SPN after verifying no duplicates exist
Usage: setspn -S SPN computername
-D = delete arbitrary SPN
Usage: setspn -D SPN computername
-L = list registered SPNs
Usage: setspn [-L] computername
-Q = query for existence of SPN
Usage: setspn -Q SPN
-X = search for duplicate SPNs
Usage: setspn -X
B. Time Skew between remote SQL and Site Server:
If SQL is remote from the site server you are trying to upgrade insure there is not a time skew between the two machines. A default Windows Active Directory domain has a Kerberos policy to allow no more than a 5 minute time difference between machines for successful Kerberos authentication.
C. Re-Registering relevant files:
In some case re-registering a couple of files has resolved SP2 install issues.
Configmgrsetup.log:
<11-14-2008 23:20:11> CompileMOFFile: Starting to compile MOF
E:\SMS\bin\i386\smsRprt.mof
<11-14-2008 23:20:12> CompileMOFFile: Failed to compile MOF
E:\SMS\bin\i386\smsRprt.mof, error –2147217407

If you try to manually compile smsRprt.mof you get the following error:
E:\SMS\bin\i386>mofcomp smsrprt.mof
Microsoft (R) 32-bit MOF Compiler Version 5.2.3790.3959
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: smsrprt.mof
MOF file has been successfully parsed
Storing data in the repository...
An error occurred while processing item 1 defined on lines 7 - 32 in file
smsrprt.mof:
Error Number: 0x80041013, Facility: WMI
Description: Provider load failure
Compiler returned error 0x80041001

From the command prompt type the following:
  • Change directory to \Program Files\Microsoft Configuration Manager\Bin\I386\
  • Run regsvr32 smsprov.dll
  • Run regsvr32 extnprov.dll
Similar to the above issue during the fourth step of SCCM setup you may see the following pop up error
message:
Fatal Error Setup Failed to install SMS Provider
The ConfigMgrSetup.log may read as follows:
TaskSequenceProvider.mof comp failure
Once this occurs the SCCM services will not start and the site server is not in a usable state.
Additionally, after you quit setup you are unable to manually mofcomp smsprov.mof or TaskSequenceProvider.mof. The following error occurs:
Provider Load Failure
If you try to manually regsvr32 smsprov.dll you receive the following:
LoadLibrary("D:\SMS\Bin\I386\smsprov.dll") failed - The specified module could not
be found.

The error is valid although this is *also* the default regsvr32 error when a path to a file you are trying to register cannot be found or the file you are trying to register does not exist in the defined path.
The solution is to use Depends.exe (Dependency Walker) against the file that wont re-register SMSprov.dll (Note: not all files are "registerable"!) http://www.dependencywalker.com/
In our case it was missing MSVCR80.dll and it wanted this file in the \Microsoft Configuration Manager\Bin\I386
directory. Copy the missing files that depends identifies to the \Bin\I386 directory.
Once placing the file there we were able to manually register SMSProv.dll and Extnprov.dll and complete setup.
D. Deleting Temp Files, Setting Temp Environment Variables:
The following error appeared in the ConfigMgrSetup.log:
<02-19-2008 12:52:42> VC redist is being installed from C:\DOCUME~1\customer\Local
Settings\Temp\vcredist_x86.exe.

***You may get an MSIEXEC help screen popup although no error will show up in the log.***
<02-19-2008 13:08:23> CompileMOFFile: Starting to compile MOF C:\Program
Files\Microsoft Configuration Manager\bin\i386\smsRprt.mof
<02-19-2008 13:08:24> CompileMOFFile: Failed to compile MOF C:\Program
Files\Microsoft Configuration Manager\bin\i386\smsRprt.mof, error -2147217407
<02-19-2008 13:08:26> Setup cannot compile MOF file C:\Program Files\Microsoft
Configuration Manager\bin\i386\smsRprt.mof. Do you want to continue?

The .mof's referenced in the ConfigMgrSetup.log above could not be compiled manually using mofcomp.exe.
Change the TEMP folder location from %USERPROFILE%\Local Settings\Temp to C:\TEMP and deleting all temp files fixed this issue. An alternate solution and better explanation for this behavior is as follows:
In one instance, the issue was caused when the admin logged onto the server BEFORE 8.3 support was turned off and therefore his user profile was created in this manner, including the path to the temp directory.  Configuration Manager does not support 8.3 and in fact, the pre-req checker will determine if 8.3 support is enabled. In this instance, however, it was off by the time the setup was run and it does NOT check the logged on user for how their profile was created.
Log on with a user who has a profile created AFTER 8.3 support was disabled or delete the current users profile and have them log back on to re-create a new profile in the proper format and run setup again
E. Searching for a bad custom or duplicate report: Look in the C:\ConfigMgrSetup.log for something like this:
<12-27-2009 14:02:36> ***SqlError: [42S01][2714][Microsoft][ODBC SQL Server Driver][SQL Server]There is already an object named 'ExistingRights_Setup' in the database.
<12-27-2009 14:03:04> CompileMOFFile: Failed to compile MOF F:\Program Files\Microsoft Configuration Manager\bin\i386\smsRprt.mof, error -2147217407

And a corresponding entry in the SMSprov.log:
[3338][Sun 12/27/2009 14:03:03]:ERROR> SQL command failed: update Report set Category = 'Software Distribution - Packages', Comment = 'Displays all packages at a site.', DrillThroughReportID = 127,
DrillThroughURL = null, GraphCaption = '', GraphType = null, GraphXCol = 1, GraphYCol = 2, MachineDetail = 0, MachineSource = 0, Name = 'All packages', RefreshInterval = 0, ReportGUID = '{54AB50FF-A9E8-4116
-8D56-AB10B6CD66A0}', StatusMessageDetailSource = 0, UnicodeData = 0, XColLabel = '', YColLabel = ''  where ReportID = 132
***Note above that the report called "All Packages" is referenced***
e:\nts_sms_fre\sms\siteserver\sdk_provider\smsprov\sspclassbase.cpp(841) : SQL command failed: 
SQL Error: [23000][2627][Microsoft][ODBC SQL Server Driver][SQL Server]Violation of UNIQUE KEY constraint 'Report_AK2'. Cannot insert duplicate key in object 'dbo.Report'.
SQL command failed:  [23000][2627][Microsoft][ODBC SQL Server Driver][SQL Server]Violation of UNIQUE KEY constraint 'Report_AK2'. Cannot insert duplicate key in object 'dbo.Report'.

To resolve this issue we looked at the "All Packages" report, this report is included in a default install of SCCM Sp1 and SCCM SP2. However in this customers case it was noted that the report itself had been somewhat modified. To resolve this issue we deleted this report after which, we were able to compile the smsrprt.mof manually and thus SCCM SP2 install succeeded. After the install SCCM SP2 did recreate this report with the default queries. An alternate resolution may have been to simply modify the customized query in this report back to the SCCM SP1 defaults. It is not known why the report was not able to be upgraded as that troubleshooting path was not pursued.
F. Checking for pre-existing duplicate reports that are new to SCCM SP2: In a different case that was very similar to Item E, another issue was discovered. The customer had created a custom report in SCCM SP1 called “Computers that do not meet the minimum system requirements for Windows 7”. This report does not exist in SP1 however SCCM SP2 tries to create this very same report as part of its default install.
The customer was seeing this message in ConfigMgrSetup.log:
<12-09-2009 15:17:37> CompileMOFFile: Starting to compile MOF C:\Program Files (x86)\Microsoft Configuration Manager\bin\i386\smsRprt.mof
<12-09-2009 15:18:11> CompileMOFFile: Failed to compile MOF C:\Program Files (x86)\Microsoft Configuration Manager\bin\i386\smsRprt.mof, error -1
<12-09-2009 15:18:11> Setup cannot compile MOF file C:\Program Files (x86)\Microsoft Configuration Manager\bin\i386\smsRprt.mof.  Do you want to continue?

In the SMSProv.log there was a message similar to the following:
Violation of UNIQUE KEY constraint 'Report_AK2'. Cannot insert duplicate key in object 'dbo.Report'.
Report names can in fact be the same as long as their conditions and queries are different. For example create a new report and call it “Computers that do not meet the minimum system requirements for Windows 7”  for the category type select Asset Intelligence. This report can be created without error. However if you clone an existing report and try to name it the same you get a failure in the console.
"A report with this name and category already exists.  Change the Name of this report to create a unique combination."
As with item E above, the resolution is to delete the pre-existing custom report and let SP2 recreate this report for you. A few other reports that do not exist in SCCM SP1 but are created in SCCM Sp2 to look out for are:
  • “Computers that meet the recommended system requirements for Windows 7”
  • “Computers that do not meet the minimum system requirements for Windows 7”
  • "Windows 7 Upgrade Assessment - Hardware summary for all systems in a collection"
Note: Likely there are others as well. If you feel you have this issue compare SCCM SP2 Reports with SCCM SP1 Reports.
G. Upgrade fails due to registry setting:
In the ConfigMgrSetup.LOG:
<01-14-2009 16:50:22> CompileMOFFile: Compiled MOF D:\SMS\bin\i386\smsprov.mof
<01-14-2009 16:50:22> CompileMOFFile: Starting to compile MOF
D:\SMS\bin\i386\smsRprt.mof
<01-14-2009 17:06:12> CompileMOFFile: Failed to compile MOF
D:\SMS\bin\i386\smsRprt.mof, error -2147217407
<01-14-2009 17:06:12> Setup cannot compile MOF file D:\SMS\bin\i386\smsRprt.mof.

In the MofComp.LOG file:
(Wed Jan 14 16:50:23 2009.1023203) : Storing data in the repository...
(Wed Jan 14 17:06:12 2009.1971531) : An error occurred while processing item 1
defined on lines 7 - 32 in file D:\SMS\bin\i386\smsRprt.mof:
(Wed Jan 14 17:06:12 2009.1971546) : Error Number: 0x800706be, Facility: Win32
Description: The remote procedure call failed.

Cause: This can occur if the following registry value is set:
HLKM\Software\Microsoft\SMS\Providers
SQL Cache Logging =1

Resolution: To resolve this issue, set SQL Cache Logging=0
Note: SQl Cache Logging should be enabled only for troubleshooting purposes and should not be left "on".
For more information see SMS: How to Enable SQL Cache Logging in the Systems Management Server Provider
http://support.microsoft.com/kb/295040
H. Site System does not have rights to remote SQL System or Clustered SQL Nodes:
ConfigMgrSetup.log:
<05-19-2008 15:10:45> CompileMOFFile: Starting to compile MOF D:\Program
Files\Microsoft Configuration Manager\bin\i386\smsRprt.mof
<05-19-2008 15:11:26> CompileMOFFile: Failed to compile MOF D:\Program
Files\Microsoft Configuration Manager\bin\i386\smsRprt.mof, error -1
<05-19-2008 15:11:26> Setup cannot compile MOF file D:\Program Files\Microsoft
Configuration Manager\bin\i386\smsRprt.mof. Do you want to continue?

SMSPROV.log showed a log in failure for the computer account of the site server.  Check the rights for the Clustered SQL instance per http://technet.microsoft.com/en-us/library/bb680513.aspx
In this case we found that the computer account for the site server was not a member of the local admin group on either node. Adding the site server computer account to the local administrators group on both nodes and installation proceeded to a successful conclusion.

Jan 21, 2011

SMS 2003 and SCCM 2007 Reporting and the 10,000 row limit

From:  http://blogs.technet.com/smsandmom/archive/2006/07/10/441033.aspx
When running what ends up as being a very large report or data set using SMS 2003 Reporting, it may seem as if there are limitations as to the amount of rows or data being returned.  This is often described as there being only a partial set of data returned, and has to do with some default IIS limits. Fortunately, these limits can be changed.
To get a better idea if whether you are running up against some default configurations of SMS and IIS limiting report returns to about 10,000 rows of data, or possibly 4mb of information, you can disable friendly HTTP messages in the Internet Options on the client accessing the Web Report.
To disable friendly messages :


  • On the Client open Internet Options  and select the Advanced tab.
  • Next scroll down to “Show friendly HTTP Error Messages” and uncheck the box.  These will now be disabled allowing the somewhat unfriendly error message below to be returned.
Response object error ‘ASP 0251 : 80004005′
Response Buffer Limit Exceeded
/smsreporting_mat/Report.asp, line 0
Execution of the ASP page caused the Response Buffer to exceed its configured limit.
Should you see this error what is likely happening is that the amount of data being returned exceeds the current IIS configuration which defaults to 10,000 rows.   Fortunately this can be remedied.
The solutions to this problem can be found on the SMS 2003 FAQ at this location:
http://www.microsoft.com/technet/prodtechnol/sms/sms2003/techfaq/tfaq10.mspx#EXH
What is not always clear from the FAQ or overlooked is that there are multiple steps which are all often needed to get a complete solution.  I have provided a quick and dirty hit list here to get you on your feet should you run into this limit:
Before beginning I’d like to state that the following steps are not intended to be an exhaustive resource on making modifications to your SMS registry or IIS Metabase entries.  In fact, before you begin I recommend reviewing the FAQ and its referenced documents to ensure you are comfortable with the changes you are about to make. Back up the IIS metabase and the appropriate registry keys before making any of these changes. Mucking about in the Metabase and Registry with a vague idea as to results of actions taken, or where inattention to details occur could render your Site, Component Server, or IIS installation worse off than having SMS Reports failing to return all of the data you expect.  Sufficient warning?   I hope so.
 __________________________________
  1. First you should adjust the registry value on the SMS Reporting Point server to allow for returning a larger Row Set.
    1. You can change the limit by modifying the registry on the reporting point machine.
    2. Under the HKEY_LOCAL_MACHINE\Software\Microsoft\SMS\Reporting key, add the DWORD value Rowcount and assign it the value for your desired maximum limit.
    3. The maximum row count in decimal is 32767.
    4. If you need to return more than 32,767 records, you can set the row count to 0xffffffff hexadecimal, which will return all rows. However, this significantly increases the workload on the SMS site database.
  1.  Next increase the IIS 6.0 Metabase’s ASPBufferingLimit as needed.
    1. The ASPBufferingLimit defaults to 4mb and is set in the IIS Metabase.
    2. To change the default, open %WindowsRoot%\System32\InetSrv\MetaBase.xml and search for “AspBufferingLimit”. Adjust the setting to allow for 1 MB per 1000 records. You can make changes to the MetaBase.xml file while IIS is running only if the edit-while-running feature is enabled. Otherwise, you must stop IIS before editing the MetaBase.xml file.
    3. For more information about writing changes to MetaBase.xml, per the FAQ,  please reference “Configuring the Metabase” in the Server Administration Guide on Microsoft TechNet.
  1. Finally you’ll likely need to adjust the Timeout values for running ASP Scripts.  This is best adjusted from within the IIS manager.  The steps for doing so are provided here but have been taken from this information on the Microsoft Technet site: http://technet2.microsoft.com/WindowsServer/f/?en/Library/9dd29efe-3cfb-4f04-a6bf-ba07df5942c41033.mspx
    1. Open the IIS Manager on your Reporting Point.
    2. Double-click on the local computer and then drill down to and open the Default Web Site properties.
    3. Select the Home Directory tab and click on the Configuration button and then the Options tab.
    4. In the Application Configuration section increase the Asp Script Timeout value to 180 sec.  The default is 90.
__________________________________
Following these steps should allow you to increase your Reporting Servers ability to serve up those extra large data sets for reports which have previously been problematic.
One thing to keep in mind is that defaults are set for a reason.  Any time values are adjusted from those defaults you’ll need to monitor your systems and actions for performance.  When in doubt, back it up before you act and keep a log of the changes you make.

Jan 13, 2011

Report for Operating System With Their Language installed

You might have different operating Systems installed on the computers.One fine day your boss might request you to get list of computer with Operating system and language installed on the computers.Here is the Report to list all the computers with this information.
select distinct a.name0,c.Caption0 as ‘Operating System’,c.CSDVersion0 as Version,b.SystemDefaultLCID as Language from v_R_System a,
v_GS_WORKSTATION_STATUS b,v_GS_OPERATING_SYSTEM c
where a.ResourceID=b.ResourceID and a.ResourceID=c.ResourceID
group by a.name0,b.SystemDefaultLCID,c.Caption0,c.CSDVersion0
Here is the link to refer for Locale IDs, Input Locales, and Language Collections for Windows XP and Windows Server 2003 http://msdn.microsoft.com/en-us/goglobal/bb895996.aspx

SMS/SCCM Clients installation Troubleshooting Check list

Seen Lot of questions/helps in many forums on the SCCM client issues like client is not reported to SCCM console ,site code unsuccessful, Client is installed but Console shows NO and many more.
Here is the check list which i have prepared to follow in brief .There may be other issues which are not mentioned here but mostly, issues lies under the below conditions.
There are a variety of Client deployment methods that are available to you when installing the client. Each has its advantages and disadvantages along with the need to meet specific business requirements.
If you choose to go SCCM client push installation method, Ensure you have created Client push installation account which should have Admin rights on the target computer else it may fail .Client push installation Step by Step Guide is here http://technet.microsoft.com/en-us/library/bb632380.aspx and with Screen shots how to configure from Windows-Noob
Once you initiated the Client push installation from SCCM console( right click on computer,say install client etc ),you can start monitoring CCM.log from your \Logs. For more info on how SCCM client push installation works,please refer this article for process and troubleshooting .
The procedure  is same what ever the installation method you choose.The CCMSETUP.EXE will be downloaded to the system (c:\windows\system32\ccmsetup) and is executed. The ccmsetup.exe reads the manifest file (and also mobileclient.tcf) and fetches the remaining files(prerequisites files listed below ) to continue the client installation.

 Some of the components that are used in the client deployment process include the following:
 CCMSetup.exe: Used to Install, uninstall and upgrade the SCCM 2007 client using client push installation or manual installation. It is low bandwidth aware and is the single way to launch client deployment. You also do not need to use CCMClean to uninstall the client as the uninstall switch can be used instead.
BITS: BITS 2.0 is required for Windows 2000 clients. BITS 2.5 is used for most of the Windows operating systems with the exception of Windows Vista which uses BITS 3.0.
Note: When installing BITS 2.0 on Windows 2000 SP4 machines, a restart is required. This means that if you do not have BITS 2.0, then ccmsetup will stop the install and wait until the next process of reboot before it starts the next process.
Microsoft Windows Installer v3.1 v2 (KB 893803): Update to all operating systems except Windows Server 2003 SP1 and later
• Windows Update Agent (WUA) version 7.0.6000.363: Used on clients to support detection of applicable updates and deployment
MSXML6.msi – Windows installer script for installing the Core XML Services
MSRDC (Remote Differential Compression): Required for branch DP to support binary differential replication. For more information on binary differential replication, please visit http://technet.microsoft.com/en-us/library/bb693953.aspx .
Regarding windows 2000 clients, they don’t support MSRDC, so Windows 2000 clients cannot be branch DP’s. Windows XP and later will install this utility and the associated windows server code will be used to install the bits.
Wimgapi.msi: Imaging API for custom tools for image management
CCMSetup.msi: Windows installer package for deploying of the SCCM 2007 client using AD GPO. You cannot run CCMSetup.msi to install clients manually.
You can monitor CCMSETUP.LOG ,CLIENTMSI.LOG from your ccmsetup folder. It will take few min to complete the installation .Once you see, client installation succeeded,You may confirm that,installation is done but it doesn’t mean,client is healthy and able to receive policies /send information to Management Point.
Below are the SMS Related services which should (applicability depends on the client perform actions let say BITS is not used when you run the Application from DP) be running on the Client to be healthy all the time.
  1. Automatic Updates
  2. Background intelligence Transfer service
  3. Remote Registry
  4. SMS agent Host
  5. Terminal Services
  6. Windows Installer
  7. Windows Management Instrumentation
To know if the client is healthy and able to send /receive polcicies /able to talk to Management point or not ,there are few Log files which you should look into:
CCMSETUP.LOG—–>Logs the Client installation activities
ClientLocation.log—->  Records site assignment tasks. Can help to troubleshoot scenarios where the client is not assigned to a Configuration Manager 2007 site.
LocationServices.log—> Records attempts to find management points and distribution points.Can help to troubleshoot scenarios where the client cannot find a management point or distribution point.
AND open the configuration manager Applet from control Panel and go to actions tab,check if you are able to if you are able to see more than 5 policy agents displaying or not which means that client is healthy and sent its inventory information to SCCM site server. You should be able to see the Client with SCCM client Installed and assigned Yes
Agents more information about  SCCM client log files,please refer TechNet
Now its time to do the actual troubleshooting why client is not getting the above policy agents or not reported to SCCM console with Client YES and Installed YES


1.Check the Firewall Enabled or Disabled if enabled,allow the ports to talk to site server.Guide to add Ports to the firewall to allow the required files or policies to download.
2.Check Boundaries (could be (AD site or IP Range or IP Subnet) of the Agent are specified in the site server
3.Schema extension and ensure attributes published into AD system management container (you can see component status if there are any errors while updating the system Management container with attributes)
4.Check the if there no DNS issue in the client and that client is able to resolve the SCCM server NetBIOS as well as FQDN without any issues.
5. Check if the Client is able to talk to Management Point or not using the following Links.
http:// —-should give you blank page
http:// give you some random numbers
6.Check if WMI is working or not if not try repairing the WMI by stopping WMI service and renaming repository folder (C:\Windows\System32\wbem) and start the service.
If the above test fails make sure that MP is working fine. You can check mpcontrol.log on the site server to find the error and make sure that the same works.
4.Check the Locationservices.log( Finds management points and distribution points) and clientlocation.log( Site assignment tasks) and ClientIDManagerStartup.log(Creates and maintains the client GUID)
If you see anything apart from the above discussed,you may can post the query on SCCM forums also I would like to hear if i miss anything from above steps.

sccm: resources for authoring ssrs reports

at first blush, resources appear scarce for this subject matter.  they exist but may be a bit obscure since they don't immediately show up in search results.  for that reason, I'm compiling this list.