Unable to push new task servers to computers with .Net 4.7.
SMP 7.6 and 8.0
Update the Potential Task Servers filter definition ( found in Manage> Filters> Computer Filters> Task Service Filters> Potential Task Servers ) to the following:
-- get current NS version
DECLARE @majorVersion float
DECLARE @version varchar(40)
DECLARE @pos int
declare @thisNS uniqueidentifier
SET @version = (SELECT TOP 1 Version FROM DBSchema ORDER BY Id DESC)
-- position of second dot
SET @pos = CHARINDEX( '.', @version, CHARINDEX( '.', @version ) + 1 )
SET @majorVersion = CAST( SUBSTRING( @version, 1, @pos - 1 ) AS float )
SET @thisNS = (select Value from ServerSettingGuids where [Name] = 'OwnerNSGuid')
-- main select
SELECT DISTINCT vc.[Guid]
FROM [dbo].[vComputerIdentification] vc
JOIN [dbo].[Inv_AeX_AC_Client_Agent] invca
ON
invca.[_ResourceGuid] = vc.[Guid]
AND
invca.[Agent Name] = 'Altiris Agent'
JOIN [dbo].[Inv_AeX_AC_NT_Services] svcs
ON
svcs.[_ResourceGuid] = vc.[Guid]
AND
UPPER( svcs.[Name] ) = 'W3SVC'
JOIN [dbo].[Inv_AeX_AC_Identification] invi
ON
invi.[_ResourceGuid] = vc.[Guid]
JOIN [dbo].[Inv_AeX_AC_NetFrameworkVersions] invnfv
ON
invnfv.[_ResourceGuid] = vc.[Guid]
WHERE
-- ensure the machine is local
vc.[IsLocal] = 1
AND
-- ensure the machine is managed
vc.[IsManaged] = 1
AND
-- ensure that the machine is not already a task service computer
vc.[Guid] NOT IN
(
SELECT vps.[ResourceGuid]
FROM [dbo].[vActiveTaskServiceComputers] vps
)
AND
-- see if this machine has proper OS
(
-- Win32 OR Win64
vc.[System Type] LIKE 'Win[36]_'
AND
(
-- Windows 7, Windows 7 SP1
(vc.[OS Name] LIKE 'Windows 7%' AND (vc.[OS Revision] = '' OR vc.[OS Revision] like '%Service Pack 1'))
OR
-- Windows 8
(vc.[OS Name] LIKE '%Windows 8%')
OR
-- Windows Server 2008, Windows Server 2008 SP2
(vc.[OS Name] LIKE '%2008%' AND vc.[OS Name] NOT LIKE '%Core%' AND vc.[OS Name] NOT LIKE '%R2%' AND (vc.[OS Revision] = '' OR vc.[OS Revision] like '%Service Pack 2'))
OR
-- Windows Server 2008 R2, Windows Server 2008 R2 SP1
(vc.[OS Name] LIKE '%2008 R2%' AND vc.[OS Name] NOT LIKE '%Core%' AND (vc.[OS Revision] = '' OR vc.[OS Revision] like '%Service Pack 1'))
OR
-- Windows Server 2012
(vc.[OS Name] LIKE '%2012%')
OR
-- Windows 10
(vc.[OS Name] LIKE '%Windows 10%')
OR
-- Windows Server 2016
(vc.[OS Name] LIKE '%2016%')
)
)
AND
-- ensure that the machine has proper NET. Framework version
(invnfv.[NETVersion] LIKE '4.5.[^0]%' OR invnfv.[NETVersion] LIKE '4.[6,7]%')
AND
-- ensure the agent is the proper version
CAST( SUBSTRING( invca.[Product Version], 1, CHARINDEX( '.', invca.[Product Version], CHARINDEX( '.', invca.[Product Version] ) + 1 ) - 1 ) AS float ) = @majorVersion
UNION
SELECT cm.[ResourceGuid]
FROM [dbo].[CollectionMembership] cm
JOIN [vRM_Computer_Item] item ON item.[Guid]=cm.ResourceGuid AND item.[OwnerNSGuid] = @thisNS -- Analog vComputer.IsLocal
LEFT JOIN vActiveTaskServiceComputers actTS on actTS.ResourceGuid = cm.ResourceGuid
WHERE cm.[CollectionGuid] = 'ECDBDB8D-7386-482E-96A6-AE5E5FB94AF0' AND actTS.ResourceGuid IS NULL