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

    If your script is named with the .ps1 extension and you're in a PowerShell window, you just run ./myscript.ps1 (assuming the file is in your working directory).

  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 …

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

  4. Call PowerShell script PS1 from another PS1 script inside …

    I want call execution for a myScript1.ps1 script inside a second myScript2.ps1 script inside Powershell ISE. The following code inside MyScript2.ps1, works fine from Powershell …

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

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

    May 28, 2020 · In order for me to get this to work, I had to use the fully qualified address for Powershell, i.e.: "C:\Program Files\PowerShell\7\pwsh.exe". Only then was I actually running …

  7. How to run a PowerShell script with verbose output?

    Dec 26, 2016 · I'm wondering if there's a way to run a PowerShell script such that both the commands and the output of each line of the script are printed. For example, in Bash you …

  8. Running PowerShell as another user, and launching a script

    Mar 11, 2015 · I won't get into all the details of why I need this, but users must be able to launch PowerShell as a service account and when PowerShell loads it needs to run a script. I already …

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

    Dec 5, 2012 · Despite Foo.ps1 being in the directory from where I am calling Powershell, this results in: The term '.\Foo.ps1' is not recognized as the name of a cmdlet, function, script file, …

  10. 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).