SMS SQL for Metering Data

Shows you the computer, file name, file path, usage count, and last usage. Must have metering enabled, with some valid rules defined.

----Begin SQL----

SELECT SYS.Netbios_Name0, SF.FileName, SF.FilePath,
MUS.UsageCount, MUS.LastUsage
FROM v_MonthlyUsageSummary MUS INNER JOIN v_R_System SYS
ON MUS.ResourceID = SYS.ResourceID INNER JOIN v_GS_SoftwareFile SF
ON MUS.FileID = SF.FileID
ORDER BY SYS.Netbios_Name0, SF.FileName, SF.FilePath

----End SQL----


About the Author

Emmanuel Tsouris is a Systems Management veteran and Developer Advocate specializing in PowerShell and Cloud Automation. He maintains DotVBS to preserve legacy knowledge for the "archaeologist admin."

Ready to move from VBScript to the Cloud? Check out his book, Pro PowerShell for Amazon Web Services.

Visit EmmanuelTsouris.com for his latest projects.

As an Amazon Associate, I earn from qualifying purchases at no cost to you.

Comments

Popular posts from this blog

SMS "Program failed (run time exceeded)" 10070

SMS "Waiting for User Condition" 10036

Reading the SCCM Client GUID