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

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

    Feb 9, 2023 · The example below shows a script filename that contains spaces. When you try to execute the script, PowerShell instead displays the contents of the quoted string containing …

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

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

    Dec 9, 2022 · Supporting Resources Functions Pass parameters to a PowerShell script Param To define arguments by name, use a param statement, which is a comma separated list of …

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

  6. Run PowerShell script as a different user and elevated

    Jan 21, 2021 · Is the script directory local or on the network? As you've noticed, starting a new instance of powershell with runas won't change the user, and runasuser won't elevate the …

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

  8. PowerShell Scripting - Run a Script from Shortcut | Tutorials

    Nov 7, 2017 · One of many PowerShell security features is that you can't run a script simply by double clicking it's icon on desktop or in a folder. Doing so will by default open script in …

  9. powershell - Get current script file - Super User

    Something like get-currentscript. What I really want to do is retrieve the script file creation and/or modification time. Presumably this would be retrievable from the script file object. Of course, I …

  10. Powershell script to stop services and set to manual

    Jan 17, 2023 · I am looking for a script to run on several remote servers at once to stop a particular service if it is running and set it to manual startup. That bit is the easy part, I would …