About 974,000 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 unsigned scripts by entering:

  2. How do I run multiple commands on one line in PowerShell?

    16 For PowerShell 5 (default install for Windows machines for the foreseeable future), you can of course use a semicolon to separate statements, but all statements will be executed by default even if one …

  3. What is the ampersand sign (&) before commands in PowerShell?

    Feb 9, 2023 · You can use the call operator to execute scripts using their filenames. The example below shows a script filename that contains spaces. When you try to execute the script, PowerShell instead …

  4. Run PowerShell script as a different user and elevated

    Jan 21, 2021 · Then execute the script elevated from that local copy instead. Execute the Start-Process Powershell a little differently than you were executing it for it to take the action of the script logic …

  5. how to run a powershell script as administrator - Super User

    Feb 12, 2010 · I use it to start the powershell console as administrator. A similar result is to create a ps1 file with Start-Process powershell.exe -Verb RunAs.

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

    May 28, 2020 · 9 When you run your script, it will run in the default OS Powershell host, and on Windows that will be the default OS version of Windows PowerShell, unless you specifically tell it …

  7. PowerShell Script Fails via Task Scheduler (SYSTEM)

    Jul 3, 2025 · Action: powershell.exe -ExecutionPolicy Bypass -File "path\to\script.ps1" The script works perfectly when run manually in PowerShell ISE, but fails or does nothing when triggered via Task …

  8. PowerShell Scripting - The Basics | Tutorials - Ten Forums

    May 13, 2018 · A PowerShell script is a collection of commands and cmdlets to be run in logical order, previous lines in script determining values and variables in command lines thereafter. The principle is …

  9. How to open a firewall port in Windows using Power Shell

    Nov 20, 2014 · You can use this command from the Powershell level. If you absolutely must use Powershell, you can use something like the script below (for the port 80 as well):

  10. Correct syntax to pass an argument to my parameter in a PowerShell …

    Dec 9, 2022 · In this same script which defines the function, you also call the function with the named parameter but you have left out the variable to pass to the function on that call.