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 (270k 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

Hello, I need a way to populate with a schedule task "userWorkstations" with a list of computer objects located under a specific OU. The process must not relpace values already in "userWorkstations" attribute. Thanks, Mic

asked Jan 26, 2022 by zemitch (200 points)
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, 2021 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 (200 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, 2021 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 (2.3k points)
3,326 questions
3,026 answers
7,727 comments
544,678 users