Hello,
Unfortunately, it is not possible to use the If <property><relation><value> condition to check the value of TerminalServicesProfilePath as it is a flag of the Remote Desktop Services Settings property, not a separate property. You need to use the If PowerShell script returns true condition and the below script. In the script, the $valueToCheck variable specifies the value from which the TerminalServicesProfilePath should start for the condition to be met.
$valueToCheck = "\\server*" # TODO: modify me
$Context.ConditionIsMet = $Context.TargetObject.TerminalServicesProfilePath -like $valueToCheck