About 420,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 …

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

  4. 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 12 years, 11 months ago Modified 1 year, 3 months ago Viewed 499k times

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

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

    734 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 …

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

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

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

  10. how to use 'dry-run' in powershell - Stack Overflow

    Jun 26, 2012 · What if: Performing operation "Output to File" on Target "temp9.txt". Use on Nested functions in a different module Unfortunately, -WhatIf does not propagate automatically …