About 569,000 results
Open links in new tab
  1. windows - How to run a PowerShell script - Stack Overflow

    1104 How do I run a PowerShell script? I have a script named myscript.ps1 I have all the necessary frameworks installed I set that execution policy thing I have followed the instructions on this MSDN …

  2. How to run powershell script from .ps1 file? - Stack Overflow

    Oct 23, 2019 · Powershell.exe -executionpolicy remotesigned -File "C:\Path\script.ps1" If this still isn't working, please execute your batch file via CMD (copying the path, wrapped in quotation marks, into …

  3. Windows Powershell policy execution bypass - Stack Overflow

    Apr 26, 2021 · In order to permanently change the execution policy, you need to run your powershell or registry change elevated, i.e Run as administrator. Additionally, you may have to modify your …

  4. How to enable execution of PowerShell scripts? - Super User

    Start Windows PowerShell with the "Run as Administrator" option. Only members of the Administrators group on the computer can change the execution policy. Enable running unsigned scripts by entering:

  5. How to Execute Powershell Script AS Powershell 7 from Command …

    May 28, 2020 · Just run pwsh testscript_writefile.ps1 instead of powershell testscript_writefile.ps1 The powershell command launches PowerShell 5 which is based on the Windows-only .NET framework. …

  6. How to run a Powershell script from the command line and pass a ...

    Dec 5, 2012 · How to run a Powershell script from the command line and pass a directory as a parameter Asked 13 years ago Modified 1 year, 5 months ago Viewed 500k times

  7. command line - How can I pass an argument to a PowerShell script ...

    powershell.exe itunesForward.ps1 Is it possible to pass an argument from the command line and have it applied in the script instead of the hardcoded 30 seconds value?

  8. PowerShell Scripting - Run a Script from Shortcut | Tutorials

    Nov 7, 2017 · You can right click script and select Run with PowerShell, open it in PowerShell and run manually, run it from another script or call PowerShell to run it from Command Prompt or a batch file, …

  9. 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 …

  10. How to run a PowerShell script from a batch file - Stack Overflow

    Powershell.exe -executionpolicy remotesigned -File C:\Users\SE\Desktop\ps.ps1 Otherwise PowerShell considers the arguments a line to execute and while Set-ExecutionPolicy is a cmdlet, it has no -File …