About 59 results
Open links in new tab
  1. how to run a powershell script as administrator - Super User

    Feb 12, 2010 · A shortcut to script.ps1 works, as does a shortcut to powershell.exe -f script.ps1, but the latter can be set to run as administrator (see powershell.exe /? for the explanation of the -f or -File …

  2. Running a command as Administrator using PowerShell?

    Sep 12, 2016 · Here is how to run a elevated powershell command and collect its output form within a windows batch file in a single command (i.e not writing a ps1 powershell script).

  3. windows - How to run a PowerShell script - Stack Overflow

    1115 Prerequisites: You need to be able to run PowerShell as an administrator You need to set your PowerShell execution policy to a permissive value or be able to bypass it Steps: Launch Windows …

  4. Run PowerShell script as a different user and elevated

    Jan 21, 2021 · 8 Are you automating something or just running a script occasionally? Is the script directory local or on the network? As you've noticed, starting a new instance of powershell with runas …

  5. Run a PowerShell script from a cmd batch as admin

    Jan 17, 2022 · I have a PowerShell setup which I want to execute on a computer where perhaps the execution policy is restricted and requires admin rights. Ideally, I could wrap it in a cmd batch like …

  6. powershell - I want to run Power Shell script with admin privileges ...

    Run this command of a PowerShell console: Start-Process powershell -Verb runAs Run your script from PowerShell like this: PowerShell -f C:\ScriptPath For more details, you can check this StackOverflow …

  7. working directory - How do I run a PowerShell script as administrator ...

    Feb 25, 2021 · I also tried this "powershell.exe -ExecutionPolicy Bypass -NoExit -File "C:\project\test.ps1" " I can run in normal way but cannot run as administrator, because when I run …

  8. uac - Running a PowerShell script as administrator without typing in ...

    You should see that your PowerShell script runs with full Administrator Privileges and without any UAC prompts. Now, if you want to run your PowerShell script on a regular schedule, you could customize …

  9. Force a PowerShell script to be run as administrator

    Jun 26, 2013 · I have written a powershell script that installs and starts some services. It will only work if the script is run as administrator. Is there any way force a script to have those privileges?

  10. Run as administrator - Add to PS1 File Context Menu in Windows 10

    Oct 8, 2022 · A PS1 file is a script, or cmdlet, used by Windows PowerShell. This tutorial will show you how to add or remove Run as administrator from the context menu of PowerShell .ps1 files for all …