Hi All,

Here like
http://blogs.technet.com/b/neilp/archive/2012/11/29/software-metering-deep-dive-and-automation-part-2-use-it-or-lose-it-the-collections.aspx


   1. select SMS_R_SYSTEM.ResourceID,
   2. SMS_R_SYSTEM.ResourceType,
   3. SMS_R_SYSTEM.Name,
   4. SMS_R_SYSTEM.SMSUniqueIdentifier,
   5. SMS_R_SYSTEM.ResourceDomainORWorkgroup,
   6. SMS_R_SYSTEM.Client
   7.
   8. from SMS_R_SYSTEM inner join SMS_MonthlyUsageSummary on
   SMS_R_SYSTEM.ResourceID = SMS_MonthlyUsageSummary.ResourceID
   9. INNER JOIN SMS_MeteredFiles ON SMS_MonthlyUsageSummary.FileID =
   SMS_MeteredFile.MeteredFileID
   10. WHERE DateDiff(day, SMS_MonthlyUsageSummary.LastUsage, GetDate()) <
   30


IT showing the machine correctly

In above WQL query its working but if i add to this (mean to say if we add
Metering Rule ,its not working )

AND SMS_MeteredFiles.R'uleID = ''MeterID''

ITs not working any idea ?




On Thu, Nov 14, 2013 at 2:39 AM, Ranvir singh <[email protected]>wrote:

> But just I have SCCM Servers..nothing else..
>
> Can we have working WQL query for the same
>
>
> On Thu, Nov 14, 2013 at 1:45 AM, Marcum, John <[email protected]> wrote:
>
>>  It's so much cooler to do it this way ;-)
>>
>>
>>
>>
>> http://myitforum.com/myitforumwp/2013/01/07/tracking-automatic-software-removals/
>>
>>
>>
>>
>>
>>
>>
>>
>>  * ------------------------------ *
>>
>> *John Marcum*
>> *Sr. Desktop Architect*
>>
>> *Bradley Arant Boult Cummings LLP*
>>  ------------------------------
>>
>>
>>
>> *From:* [email protected] [mailto:
>> [email protected]] *On Behalf Of *Ranvir singh
>> *Sent:* Wednesday, November 13, 2013 1:58 PM
>> *To:* [email protected]
>> *Subject:* [mssms] Creating Uninstall Collections Using Software Metering
>>
>>
>>
>> http://www.myitforum.com/articles/8/view.asp?id=10909
>>
>>
>>
>> Showing as a Typo error after replacing the Rule ID as well
>>
>>
>>
>> SELECT DISTINCT SMS_R_System.*
>>          FROM            SMS_G_System_SoftwareFile
>>          INNER JOIN      SMS_R_System
>>                ON        SMS_G_System_SoftwareFile.ResourceID = 
>> SMS_R_System.ResourceID
>>
>>
>>
>>
>>
>>          INNER JOIN      SMS_MeteredFiles
>>                ON        SMS_G_System_SoftwareFile.FileID = 
>> SMS_MeteredFiles.MeteredFileID
>>          INNER JOIN      SMS_MeteredProductRule
>>
>>
>>
>>                ON        SMS_MeteredProductRule.RuleID = 
>> SMS_MeteredFiles.RuleID
>>
>>
>>
>>
>>
>>          WHERE           SMS_MeteredFiles.RuleID = 6
>>                AND       DateDiff(day, 
>> SMS_G_System_SoftwareFile.ModifiedDate, GetDate()) > 30
>>                AND       DateDiff(day, 
>> SMS_MeteredProductRule.LastUpdateTime, GetDate()) > 30
>>
>>
>>
>>
>>
>>                AND       SMS_R_System.OperatingSystemNameAndVersion LIKE 
>> '%Workstation%'
>>                AND       SMS_G_System_SoftwareFile.ResourceID NOT IN
>>                          (
>>
>>
>>
>>                           SELECT   DISTINCT 
>> SMS_MonthlyUsageSummary.ResourceID
>>
>>
>>
>>                           FROM              SMS_MonthlyUsageSummary
>>                           INNER JOIN        SMS_MeteredFiles
>>                                 ON SMS_MonthlyUsageSummary.FileID = 
>> SMS_MeteredFile.MeteredFileID
>>
>>
>>
>>                           WHERE             DateDiff(day, 
>> SMS_MonthlyUsageSummary.LastUsage, GetDate()) < 90
>>
>>
>>
>>                                 AND         SMS_MeteredFiles.RuleID = 6
>>                           )
>>
>>
>>  ------------------------------
>>
>>
>> Confidentiality Notice: This e-mail is from a law firm and may be
>> protected by the attorney-client or work product privileges. If you have
>> received this message in error, please notify the sender by replying to
>> this e-mail and then delete it from your computer.
>>
>> ------------------------------
>>
>> Confidentiality Notice: This e-mail is from a law firm and may be
>> protected by the attorney-client or work product privileges. If you have
>> received this message in error, please notify the sender by replying to
>> this e-mail and then delete it from your computer.
>>
>>
>
>


Reply via email to