Software Deployment Question
Help with SCCM query for lower versions
I need some help with a SCCM query for a Lync update. I usually ask for all computers with Software X that isn't version Y etc. This has worked well, but the problem now is that i need to update Lync on computers that has a version number lower than the one I'm deploying. WSUS will handle updates after this, so i can't ask for an exact version non-match, because then it will try to downgrade newer versions when they come.
Since the version number is a string i won't be able to just add a > operator in the query. I guess the version number needs to split up and sorted somehow (regex?).
Computers with these versions should be added to the collection:
Any version number higher than 4087 can't be added to the collection.
I hope someone can help me! Thanks in advance!
This is a working query with version non-match (not what i want):
where (SMS_R_System.ResourceId in
(select SMS_R_System.ResourceId from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId
like "Microsoft Lync 2010" and SMS_G_System_ADD_REMOVE_PROGRAMS.Version != "4.0.7577.4103")
or SMS_R_System.ResourceId in
(select SMS_R_System.ResourceId from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS_64 on SMS_G_System_ADD_REMOVE_PROGRAMS_64.ResourceID = SMS_R_System.ResourceId
where SMS_G_System_ADD_REMOVE_PROGRAMS_64.DisplayName like "Microsoft Lync 2010" and SMS_G_System_ADD_REMOVE_PROGRAMS_64.Version != "4.0.7577.4103"))
and SMS_R_System.OperatingSystemNameandVersion like "%workstation%"
and (SMS_R_System.SystemOUName like "FOO.int/Foo" or SMS_R_System.SystemOUName like "FOO.int/BAR")
and SMS_R_System.Client = 1
Use the below in place of SMS_G_System_ADD_REMOVE_PROGRAMS.Version != "4.0.7577.4103" SMS_G_System_ADD_REMOVE_PROGRAMS.Version = "4.0.7577.0" or SMS_G_System_ADD_REMOVE_PROGRAMS.Version = "4.0.7577.280" or SMS_G_System_ADD_REMOVE_PROGRAMS.Version = "4.0.7577.314" or SMS_G_System_ADD_REMOVE_PROGRAMS.Version = "4.0.7577.4087" below part in place of SMS_G_System_ADD_REMOVE_PROGRAMS_64.Version != "4.0.7577.4103" SMS_G_System_ADD_REMOVE_PROGRAMS_64.Version = "4.0.7577.0" or SMS_G_System_ADD_REMOVE_PROGRAMS_64.Version = "4.0.7577.280" or SMS_G_System_ADD_REMOVE_PROGRAMS_64.Version = "4.0.7577.314" or SMS_G_System_ADD_REMOVE_PROGRAMS_64.Version = "4.0.7577.4087"