About 90,400 results
Open links in new tab
  1. 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 …

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

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

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

  5. Run Powershell script when you open Powershell - Super User

    Mar 8, 2015 · Is it possible to run a Powershell script when you run Powershell? As in, double click the Powershell icon and open the window. Is there some type of "auto-run" setting …

  6. How can I run psd1 and psm1 files in powershell? - Super User

    Aug 28, 2020 · I tried .\script.psd1 and .\script.psm1. How can I run it? Yes, I already set the execution policy and I want to run the script from a directory somewhere on my desktop or …

  7. How to execute a .ps1 from another .ps1 file? - Super User

    Feb 24, 2015 · I have two PowerShell files. a.ps1 and b.ps1. At a center point in a.ps1 I want to start executing code in b.ps1 and terminate a.ps1 script. How to do it considering that both …

  8. Is it possible to have scripts run in Windows Terminal by default?

    Mar 24, 2021 · The syntax for opening a new Windows Terminal session and launching a PowerShell script would be wt new-tab powershell.exe -f c:\path\to\script.ps1. That will end up …

  9. Run Powershell with parameters from batch file - Super User

    Mar 2, 2021 · I solved creating a script , .ps1 file , in Powershell ISE and after this I went to Powershell window and type this command to allow script to run : Set-ExecutionPolicy …

  10. windows - How do you run PowerShell scripts from the command …

    Dec 22, 2022 · After adjusting the PATHEXT and PATH environment variables, PowerShell scripts can accessed from the Command Prompt. The issue comes, however, is that when …