About 405,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). This is true for me anyway on Windows …

  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. How to Execute Powershell Script AS Powershell 7 from Command …

    May 28, 2020 · When I run that same .PS1 script from command prompt using powershell testscript_writefile.ps1, I get: Name Value ---- ----- PSVersion 5.1.14393.3471 PSEdition Desktop …

  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 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, 4 months ago Viewed 500k times

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

  7. Call PowerShell script PS1 from another PS1 script inside Powershell ...

    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 Administration, but...

  8. Run PowerShell script as a different user and elevated

    Jan 21, 2021 · Execute the Start-Process Powershell a little differently than you were executing it for it to take the action of the script logic while running elevated too. Add the ExecutionPolicy Bypass …

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

    152 I explain both why you would want to call a PowerShell script from a batch file and how to do it . This is basically what you are looking for:

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