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

I have a scheduled task that runs a custom command that itself has multiple custom commands that run in a specific timed order. I would like the scheduler to run that top level ... , but Command B and C will wait for Command A to finish. Is this possible?

asked Jul 23 by DA-symplr (100 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)
3,549 questions
3,240 answers
8,232 comments
547,820 users