VMware Cloud Community
jackchentoronto
Enthusiast
Enthusiast

How to run a guest process as administrator?

I am trying to fix a Windows 10 instance issue and I put a powershell script on the VM, tested it on the VM and it was working, the script need to be run as administrator.

Now I want to use a workflow to run this script, I create a guest operation-> run process, it did run the script but it's not runing it as administrator, so it failed.

Is there a way to run a process in guest VM as administrator?

Thanks!

-Jack

0 Kudos
2 Replies
tschoergez
Leadership
Leadership

Check out the discussions in the Guest Script MAnager package thread: https://communities.vmware.com/docs/DOC-25474

There you learn about the different ways to elevate user permissions for the guest operations.

Be aware that there might be limitations 🙂 Security and automatability are some conflicting requirements 🙂

Regards,

Joerg

jackchentoronto
Enthusiast
Enthusiast

Thanks Joreg.

I was hoping to see if there is some way in workflow to do the trick ( maybe there isn't  😞 ). I found the same script is working fine when I run it as a "run once" script in VM customization template, so it must be running as admin at that time.  Now I want to use the workflow to do the same thing, clone the VM, then run the script, but it didn't work.

I already tried to copy a powershell binary and mark it as "run as administrator", but when I run it, UAC will still jump out, so I guess it won't work. Hate to disable UAC just for this, I am checking other options to bypass UAC now, somebody mentioned setup a schetask can do the trick, will give it a try.

0 Kudos