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 (1.1k points)

1 Answer

0 votes
by (201k 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

Thanks for the info. I'm now grabbing the %adm-ManagerUserName% value, but need to remove the final 21 characters of it so it contains only their username and not our ... this in the PowerShell Script Editor for my business rule, I get the following error:

asked Mar 11 by mkvidera (60 points)
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, 2020 by TheLexicon (110 points)
0 votes
1 answer

Is there a way to get the name of the user who approved a request and supply that to a step inside of a custom command? For example, HR submits a status change for an employee. ... and pass it as a param in a custom command that is called in one of the steps?

asked May 12 by davfount90 (20 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, 2020 by mark.it.admin (1.5k 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 (1.2k points)
2,493 questions
2,240 answers
6,013 comments
414,864 users