Friday 29 July 2011

SCCM Report : Count of all instances of software registered with Add or Remove Programs that you want to list


Did you ever want to list your software counts for your licenses. Did management ever requested a report like that. Well below you will find the query code to do that . I am pretty sure there are still better ways to do it , but hey I am a novice in SQL reporting …When I have figured out a better way , because it is really static right now , I’ll post it anyhow .

*************The query *************
select
    DisplayName0,
    Version0,
    Count (Distinct arp.ResourceID)
From
    dbo.v_Add_Remove_Programs ARP
Where
    DisplayName0 in ( 'Microsoft Office Professional Edition 2003','Microsoft Office Standard Edition 2003','Microsoft Office Enterprise 2007','Microsoft Office Standard 2007','Microsoft Office Professional Plus 2007','Microsoft Office Project Professional 2003','Microsoft Office Project Standard 2003','Microsoft Office Visio Professional 2003','Microsoft Office Visio Professional 2007','Microsoft Office Visio Standard 2003','Microsoft Office Visio Standard 2007','Microsoft Visual Studio 2005','Microsoft Visual Studio 2008','Microsoft Visual Studio 2005 Professional Edition - ENU','Microsoft Visual Studio 2005 Team Suite - ENU','Microsoft Visual Studio 2008 Professional Edition - ENU',' Microsoft Visual Studio 6.0 Enterprise Edition','Microsoft SQL Server 2005','Microsoft SQL Server 2000','Microsoft Project 2000 SR-1','Microsoft Project 2000','Microsoft Office 2000 SR-1 Professional','Microsoft Office 2000 SR-1 Standard','Microsoft Exchange')
Group by
    DisplayName0,
    Version0
Order by
    DisplayName0,
    Version0
*************The query *************
The outcome of the report ;
image

Wednesday 20 July 2011

Creating a Collection where particular Advertisement is in "particular"state

Use the Below Query which will give you all the system where the particular Advertisement is in Particular state

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_ClientAdvertisementStatus ON SMS_ClientAdvertisementStatus.ResourceID = SMS_R_System.ResourceID  Where SMS_ClientAdvertisementStatus.AdvertisementID = 'ADV ID' and SMS_ClientAdvertisementStatus.LastStateName = 'state (No Status/Succeeded..e.t.c.)'

Tuesday 19 July 2011

Creating a Collection for only Desktop machines Excluding servers

Use the below query language to Create a collection only for desktops and Laptops

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 inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SYSTEM.SystemRole = "Workstation" and SMS_R_System.OperatingSystemNameandVersion not like "%Server%"

Else in other way click on edit query statement and select as shown in screenshot below


For more clarification add another query and use and operator as shown in below two screen shots.


New to Blogging

Hi All,

This is Sachin, I work as a SMS and SCCM Administrator in an MNC i will be sharing all the things i do daily and the issues faced as it may help someone.

I faced lot of issues when starting will share update on daily basis....so welcome.