0

I need my users to be able to run a program as an admin but dont want to get them the admin details. We work in a remote desktop environment (Azure VDI) and when they run a particular program as themselves, it crashes. However, it they run the program with Admin credentials, even when they log on as a user, the program works. I want to run the program with admin credentials but without it prompting for them.

I created a ps1 file to open it and when I run it from Powershell run as administrator, it works with no prompts. How do I get the ps1 file to run in admin mode without having to enter the username and password?

5
  • I would find out why it crashes. Does cmdlet have exception handlers (try/catch)? Most likely you are getting an exception and need to find out the cause. Commented Jul 30, 2024 at 12:14
  • What is the actual failure? The term crash could mean many things. Is this just a permission denied failure? Commented Jul 30, 2024 at 13:29
  • It crashes as it cant write to the programs temp folder, 'C:\Users\xxx\AppData\Local\Filestream Ltd\Filestream 5', even though I have changed permissions on that folder to allow Everyone access. Commented Jul 30, 2024 at 13:31
  • This is the reason I'm trying to run it as an admin but without having to enter credentials Commented Jul 31, 2024 at 9:59
  • ok so it is a permission denied but works if run as an admin account. Commented Aug 1, 2024 at 9:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.