Run ‘exe’ application with admin credentials with powershell

Welcome Forums General PowerShell Q&A Run ‘exe’ application with admin credentials with powershell

Viewing 2 reply threads
  • Author
    Posts
    • #217230
      Participant
      Topics: 1
      Replies: 0
      Points: 13
      Rank: Member

      Hello everyone,

      I need your help please! 

      i am newbie in powershell, i need a script to run an exe application from users desktop for example with admin credentials without.  like for example to deploy 7zip.exe

      First of all, i created a .bat file to run my powershell script:

      cd c:\Windows\System32\WindowsPowerShell\v1.0
      powershell.exe -windowstyle Minimized -NoProfile -ExecutionPolicy Bypass -Command
      “&’C:\Users\kevin\Desktop\test\script1.ps1′”

      script1.ps1: so that’s the instructions i need to execute the EXE application

      Can you help me please?

      Thank you in advance.

    • #217269
      Participant
      Topics: 3
      Replies: 340
      Points: 1,120
      Helping Hand
      Rank: Community Hero

      So you’re wanting help to run the exe in powershell?

    • #217386
      Participant
      Topics: 4
      Replies: 2247
      Points: 5,484
      Helping Hand
      Rank: Community MVP

      …. a script to run an exe application from users desktop for example with admin credentials without. ….

      There is no secure way to bypass the UAC with a simple script. It would expose the admin credentials to the user. You can use software deployment tools like SCCM or even GPOs to distribute software in an enterprise environment.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.