@lukas.macas : I’ve not done this using PowerShell commands. it is very easy to update such fields using UiPath activities. Refer this link and let me know if you need any help.
@lukas.macas - for your problem statement, you can use “Update object properties” activities from UiPath.ActiveDirectoryDomainServices.activities (download from manage packages) and pass “scriptpath” as Single Property
Single property value = as per your requirement
Distinguished name = value from get object Distinguished name activity ( input is username defined in AD)
Use Get Object Distinguished Name activity : Input = username, output = Distinguished name
Use Update Object Properties: input = Distinguished name, single property = script path, single property value = value you want to update.
Try this and let me know if you are facing any issue.
This will not works because TerminalServicesProfilePath is not AD account attribute, because TerminalServicesProfilePath is saved in the Active Directory user object’s UserParameters attribute as a binary blob
Could you maybe share how you have configured the Invoke Power Shell activity and whether upgrading the System activity package to the latest version helps to fix the issue?