The Get More Done with BigFix Webinar series will give you exclusive access to our Team BigFix experts to learn more about BigFix and answer your questions in real time. Rhonda Studnick Kaiser, Director of Customer Experience, is your host and moderator. Please submit agenda suggestions on slack and the forum.
In this edition, John Talbert, our BigFix relevance expert, will answer your Relevance questions.
Action to run DLV, output into file and parse the InstallationID.
delete c:\test\dlv.txt
waithidden cmd.exe /C cscript c:\windows\system32\slmgr.vbs /dlv >> c:\test\dlv.txt
parameter "Installation ID"="{preceding text of first "|" of following text of first "|Installation ID: " of substrings separated by "|Name: " whose (it contains "Client-ESU-Year" ) of concatenation "|" of lines of file "c:\test\dlv.txt"}"
Relevance to further parse other elements out of the dlv.txt file
q: substrings separated by "|Name: " whose (it contains "Client-ESU-Year" ) of concatenation "|" of lines of file "c:\test\dlv.txt"
q: preceding text of first "|" of following text of first "|Installation ID: " of substrings separated by "|Name: " whose (it contains "Client-ESU-Year" ) of concatenation "|" of lines of file "c:\test\dlv.txt"
q: preceding text of first "|" of following text of first "|Activation ID: " of substrings separated by "|Name: " whose (it contains "Client-ESU-Year" ) of concatenation "|" of lines of file "c:\test\dlv.txt"
q: preceding text of first "|" of following text of first "|Extended PID: " of substrings separated by "|Name: " whose (it contains "Client-ESU-Year" ) of concatenation "|" of lines of file "c:\test\dlv.txt"
Relevance to do the same via WMI instead of inside of an action:
q: (string value of property "OfflineInstallationId" of it) of select objects "name, licensestatus, OfflineInstallationId, ID from softwarelicensingproduct where LicenseStatus >0" whose (string value of property "name" of it contains "Client-ESU-Year" AND integer value of property "LicenseStatus" of it >1 ) of wmi
q: selects "* from softwarelicensingproduct where LicenseStatus >0" of wmi
q: (string value of property "OfflineInstallationId" of it) of select objects "name, licensestatus, OfflineInstallationId, ID from softwarelicensingproduct where LicenseStatus >0" whose (string value of property "name" of it contains "Client-ESU-Year" AND integer value of property "LicenseStatus" of it =0 ) of wmi
q: select objects "name, licensestatus from softwarelicensingproduct" whose (string value of property "name" of it contains "Client-ESU-Year" AND integer value of property "LicenseStatus" of it =1 ) of wmi
q: not exists (selects "LicenseStatus from SoftwareLicensingProduct WHERE (PartialProductKey is not null) AND (Name like 'Windows%25') AND (Name like '%25Client-ESU-Year1%25') AND (Description like '%25MAK%25') AND (PartialProductKey like 'WJ8T9')" of wmis) whose (integer value of it = 1)
(note = 1 is licensed.. for installed but not activated, consider >1)