The "Task Service" box cannot be enabled.
Scenario: A newly added Site Server cannot be assigned Task Service duties because the box was grayed / greyed out, and could not be enabled.
select c.Guid, c.Name
from CollectionMembership cm
join vComputer c on c.Guid = cm.ResourceGuid
where cm.CollectionGuid = '82D42246-52BC-4D94-BF9E-8935921AEE58'
order by c.Name
SMP 8.x
Possible Cause 1: The server has .NET 4.7x is installed on it. As a result it is not a member of the filter "Potential Task Servers"
Note: .NET 4.7x is supported in SMP 8.1 RU7x but not officially supported on RU5 or 6. However if 8.1 RU5 or 6 is installed there have been no problems discovered/reported when using .NET 4.7.
To verify if the problem is the version of .NET run the following SQL query against the database. If it returns 4.7x in the "NETVersion" column then condition is confirmed.
declare @name nvarchar(40) = 'ComputerName'
select c.Guid, c.Name, nfv.NETVersion, nfv.ExactNETVersion
from [Inv_AeX_AC_NetFrameworkVersions] nfv
join vComputer c on c.Guid = nfv._ResourceGuid
where c.Name = @name
order by ExactNETVersion
Possible Cause 2:
The reason why the new Site Server was not in the “Potential Tasks Servers” filter because it was somehow in the filter “All Computers where the Cloud-enabled Management feature is enabled” whose members are excluded from. This filter is found under “Manage \ Filters \ Computer Filters”
Or run the following query against the database:
select c.Guid, c.Name
from CollectionMembership cm
join vComputer c on c.Guid = cm.ResourceGuid
where cm.CollectionGuid = 'EA643ED2-3444-4CC5-9A94-DF8E7C1F286B'
order by c.Name
The default target used by the Policy “Settings \ Notification Server \ Cloud-enabled Management \ Cloud-enabled Management Settings” uses the filter “All Computers where the Cloud-enabled Management feature is enabled” which caused the SMA running on the Site Server to turn on CEM Mode (in the “Network Status” section.)
It may say something similar to the following:
CEM Mode: Cloud-enabled Management mode is enabled, but inactive.
This means it is expecting to be communicating through the cloud (CEM) gateway, even though it resides on the inside. Computers that are seen in the filter where this feature is enabled cannot be assigned Task Services.
When this setting gets turned on, and the SMA sends in a basic inventory the “InternetModeSupported” column in the table “Inv_AeX_AC_Network_Zone” gets set to “1” in relation to the computer's _ResourceGuid. This is how the inclusion query for the filter “All Computers where the Cloud-enabled Management feature is enabled” picks its members. And, as a result the "Potential Tasks Servers" filter excludes the computer from consideration as a Task Server.
The question became: How did it get set to this value, and how do you get it back into the “Potential Tasks Servers” filter so that it so that TS can be added to it?
In this case it is/was a “cart-before-the-horse” scenario. It can easily be reproduced.
Therefore it remains in the filter whose members “Potential Task Servers” excludes.
Catch-22.
Solution for Cause 1:
Solution for cause 2:
declare @guid uniqueidentifier
set @guid = '<Guid>'
update Inv_AeX_AC_Network_Zone set InternetModeSupported = 0 where _ResourceGuid = @guid