Execute a windows command which need admin privileged (Elevated admin rights)
Need your help here!!
I am using below remote command execution operation.
/Base [1.6.2]/Library/Operations/Operating Systems/Windows/Remote Command Execution
Need to run a command which need elevated privileged. Although the user who is running the flow is a part of administrator group, but still not able to run the command.
Can you please help here?
Where are you trying to execute the command from: studio or central? Does the request use powershell or simillar command?
I am asking this because for some commands (mostly powershell related commands) the fact that you are running the command as an user who is member of the administrator group may not be sufficient.
In case of studio for certain commands running studio as administrator (right click run as administrator) may be required (regardless of the user privileges of the user running studio or that is provided in the username\password fields).
For central on the other hand the central service in windows must be run as a specific user, not as the local system administrator that it runs as by default.
Another problem you need to be aware of is that certain commands cannot be run remotely regardles of the user privileges you may have. (for example modifying the winrm execution policy or modifying the trusted hosts for windows is not allowed to be done remotely)
Thanks for your reply!!
I am running these command from Studio.
The command is for OMW ..to enable the service "vpstat -3 -r enable".
Do you mean, if i execute the flow from central it may work?
Running it by default in central will not work. By default central runs using a lower priviledged user account than studio.
In order to make it work in studio try the things i mentioned above: start studio as administrator (right click on the studio shortcut/executable and select run as administrator). If it still doesn't work make sure the winrm configuration (visible on the powershell folder from base cp ) are all done on both the studio host and on the remote host.
If the solution to your problem is run studio as administrator, then you need to have the central service also use an explicit administrator account for logon.
For example i was trying recently to modify the contents of a text document from the c:\Temp folder. In the powershell cli my command worked, however in studio i got the same error you are getting. After starting studio as administrator it started working in studio as well. The powershell CLI is configured by default to run as administrator, this is what usually creates confusion, because when starting powershell you never have to explicitly select run as administrator.