WQL Collection queries to list Vista, Windows 7, Windows 2008 and Windows 2008 R2 systems

All Windows Vista Systems
Select SMS_R_System.Name, SMS_R_System.SMSAssignedSites, SMS_R_System.IPAddresses, SMS_R_System.IPSubnets, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.LastLogonUserDomain, SMS_R_System.LastLogonUserName, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceId, SMS_R_System.NetbiosName from  SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "%Workstation 6.0%"

All Windows 7 systems
select SMS_R_System.Name, SMS_R_System.SMSAssignedSites, SMS_R_System.IPAddresses, SMS_R_System.IPSubnets, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.LastLogonUserDomain, SMS_R_System.LastLogonUserName, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceId, SMS_R_System.NetbiosName from  SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "%Workstation 6.1%"

All Windows 2008 Systems
Select SMS_R_System.Name, SMS_R_System.SMSAssignedSites, SMS_R_System.IPAddresses, SMS_R_System.IPSubnets, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.LastLogonUserDomain, SMS_R_System.LastLogonUserName, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceId, SMS_R_System.NetbiosName from  SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "%Server 6.0%"

All Windows 2008 R2 Systems
select SMS_R_System.Name, SMS_R_System.SMSAssignedSites, SMS_R_System.IPAddresses, SMS_R_System.IPSubnets, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.LastLogonUserDomain, SMS_R_System.LastLogonUserName, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceId, SMS_R_System.NetbiosName from  SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "%Server 6.1%"

Client Schedule ID’s

Hardware Inventory Collection Task
{00000000-0000-0000-0000-000000000001}

Software Inventory Collection Task
{00000000-0000-0000-0000-000000000002}

Heartbeat Discovery Cycle
{00000000-0000-0000-0000-000000000003}

Software Inventory File Collection Task
{00000000-0000-0000-0000-000000000010}

Request Machine Policy Assignments
{00000000-0000-0000-0000-000000000021}

Evaluate Machine Policy Assignments
{00000000-0000-0000-0000-000000000022}

Refresh Default MP Task
{00000000-0000-0000-0000-000000000023}

Refresh Location Services Task
{00000000-0000-0000-0000-000000000024}

Location Services Cleanup Task
{00000000-0000-0000-0000-000000000025}

Software Metering Report Cycle
{00000000-0000-0000-0000-000000000031}

Source Update Manage Update Cycle
{00000000-0000-0000-0000-000000000032}

Policy Agent Cleanup Cycle
{00000000-0000-0000-0000-000000000040}

Request Machine Policy Assignments
{00000000-0000-0000-0000-000000000042}

Certificate Maintenance Cycle
{00000000-0000-0000-0000-000000000051}

Peer Distribution Point Status Task
{00000000-0000-0000-0000-000000000061}

Peer Distribution Point Provisioning Status Task
{00000000-0000-0000-0000-000000000062}

Compliance Interval Enforcement
{00000000-0000-0000-0000-000000000071}

Software Updates Agent Assignment Evaluation Cycle
{00000000-0000-0000-0000-000000000108}

Send Unsent State Messages
{00000000-0000-0000-0000-000000000111}

State Message Manager Task
{00000000-0000-0000-0000-000000000112}

Force Update Scan
{00000000-0000-0000-0000-000000000113}

AMT Provision Cycle
{00000000-0000-0000-0000-000000000120}

You can use the above codes to kick off different events on the client.  There are several scripts out there that will allow you to to do this.  One of the most used is the SendSched.vbs file from the SMS 2003 Toolkit2.  The toolkit can be downloaded from this link.

SCCM 2007 SP1 - Infrastructure Planning and Design guide

Microsoft Infrastructure Planning and Design team has released a guide for System Center Configuration Manager 2007 SP1 with R2.
This guide enables you to quickly select which SCCM features your organization needs in order to meet business requirements. Infrastructure Planning and Design streamlines the planning of a Configuration Manager infrastructure by:
  • Defining the technical decision flow through the planning process
  • Listing the decisions to be made and the commonly available options and considerations
  • Relating the decisions and options to the business in terms of cost, complexity, and other characteristics.
  • Framing decisions in terms of additional questions to the business to ensure a comprehensive alignment with the appropriate business landscape.
You may download the guide by visiting Microsoft Infrastructure Planning and Design and selecting Microsoft System Center Configuration Manager, or choose the IPD – All.zip for downloading all the released IPD documents and presentations.

Query to list the hardware and software inventory dates of all the SCCM clients.


SELECT DISTINCT SYS.Netbios_Name0, SYS.Operating_System_Name_and0,
  HWSCAN.LastHWScan, SWSCAN.LastScanDate, SWSCAN.LastCollectedFileScanDate 
FROM v_R_System SYS
LEFT JOIN v_GS_LastSoftwareScan SWSCAN on SYS.ResourceID = SWSCAN.ResourceID
LEFT JOIN v_GS_WORKSTATION_STATUS HWSCAN on SYS.ResourceID = HWSCAN.ResourceID

Client Status Reporting error - "The dependency service does not exist or has been marked for deletion."

You receive an error message when you configure a named instance of SQL Server 2005 as the Client Status Reporting database in System Center Configuration Manager 2007 R2
(959975) Fixes a problem that prevents you from using a SQL Server 2005 named instance as the Client Status Reporting database. This problem presents an error message: "The dependency service does not exist or has been marked for deletion."

Fix:  http://support.microsoft.com/kb/959975

Query to list all the systems that never ran an advertisement successfully.

Here is a query that can be used in SCCM report to list all the systems that never an advertisement successfully.


select distinct count(v_ClientAdvertisementStatus.resourceid) as [Number of Adverts],sys.Active0,sys.Client0,sys.Client_Version0,sys.Netbios_Name0,
sys.Operating_System_Name_and0,sys.Obsolete0,
sys.Resource_Domain_OR_Workgr0,sys.User_Domain0,
sys.User_Name0  from v_R_System sys right join v_ClientAdvertisementStatus on sys.resourceid=v_ClientAdvertisementStatus.resourceid where sys.ResourceID not in (select  distinct ResourceID from v_ClientAdvertisementStatus where v_ClientAdvertisementStatus.LastStateName = 'Succeeded') group by sys.Active0,sys.Client0,sys.Client_Version0,
sys.Netbios_Name0,sys.Operating_System_Name_and0,
sys.Obsolete0,sys.Resource_Domain_OR_Workgr0,
sys.User_Domain0,sys.User_Name0

SRS setup issue in SCCM 2007

Error in SCCM Status Messages:
SMS SRS web service is not running on SRS Reporting point server "Servername"
Error in SmsAdminUI.log:
The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to "C:\windows\Microsoft.NET\Framework\v2.050727\Temporary ASP.NET files.

Resolution:

http://technet.microsoft.com/en-us/library/bb418935.aspx