This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
.SYNOPSIS | |
Gets the software update compliance for a device in SCCM. | |
.DESCRIPTION | |
Gets the software update compliance in SCCM by Device and All Updates. | |
.NOTES | |
Requires SQL 2012 R2. | |
Part of a report should not be run separately. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Testing variables !! Need to be commented for Production !! */ | |
DECLARE @UserSIDs AS NVARCHAR(10) = 'Disabled'; | |
DECLARE @CollectionID AS NVARCHAR(10) = 'SMS00001' | |
DECLARE @OnInternet AS NVARCHAR(3) = '0' --You could make this into a multiselection in the report | |
SELECT | |
Device = ( | |
IIF( | |
SystemNames.Resource_Names0 IS NOT NULL, UPPER(SystemNames.Resource_Names0) | |
, IIF(Systems.Full_Domain_Name0 IS NOT NULL, ClientBaseline.Name + '.' + Systems.Full_Domain_Name0, ClientBaseline.Name) |