I am having issues with this string it looks correct but it does not work
lsrunase username Domain HGFRjFgV?itGxGfLNot "dsmod group \"CN=Apps,OU=app deployment groups,OU=Groups,OU=Test,OU=Data,OU=Global Test,DC=ad,DC=Tom,DC=com\" -addmbr \"CN=%computername%,OU=Workstations,OU=Test,OU=Data,OU=Global Test,DC=ad,DC=Tom,DC=com\""
If I use runas and enter in the password it works. (runas \env \user: xyz)