0 votes

Hello,

I have a simple custom command that need to update the ProfilePath of Remote Desktop Services only if the current Profilepath starts with a specific value.

I use the If <Property> condition and TerminalServicesProfilesPath contains = \servername\path" but the result is never true so the value is not updated.

Thanks in advance.

Ten

by (5.4k points)

1 Answer

0 votes
by (179k points)

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
0

Thank you!

Related questions

0 votes
1 answer

Hi all, Am trying to convert a mailbox from a user box to a shared box in O365. Have been for the past few weeks even. The ... account the method points at - http://www.adaxes.com/sdk/?ExecuteScriptContextClass.html#executescriptcontext_getoffice365credential

asked Feb 24 by TheLexicon (290 points)
0 votes
1 answer

I would like to add a parameter for country to a custom command. Since the country has to be entered correctly in order for Active Directory to accept it, I would like to ... ? I didn't find it in the documentation and the sample scripts didn't use parameters.

asked Jun 4 by mark.it.admin (3.9k points)
0 votes
1 answer

How do change the display name of a custom attribute in version 2017.2? All the information I am finding contains links that bring me to 2018 version

asked Nov 1, 2018 by hgletifer (6.2k points)
0 votes
1 answer

Dear Is it possible to change the values of a custom attribute (adm-CustomAttributeTextMultiValue4) when selecting a value from another custom attribute (adm-CustomAttributeText1). For ... , 2Latijn, 3Latijn, etc... Is this possible? Sincerly Hilmi Emre Bayat

asked Aug 26, 2019 by hilmiemrebayat (710 points)
0 votes
1 answer

I have an ADP Sync scheduled task that modifies and creates users from a csv file. I also have reports that show new users created and management history for user ... ADP Sync scheduled task so that they only run after the ADP Sync task is complete?

asked Jan 7 by barberk (290 points)
2,209 questions
1,967 answers
5,439 comments
6,443 users