About 985,000 results
Open links in new tab
  1. How to enable execution of PowerShell scripts? - Super User

    When I try to execute my PowerShell script I get this error: File C:\\Common\\Scripts\\hello.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get …

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

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

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

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

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

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

  8. Is it possible to execute a PowerShell script absolutely silently from ...

    Jun 7, 2025 · Despite the -WindowStyle Hidden option, it still shows the PowerShell window for a moment (and closes it), so it actually flashes. Is it possible to execute this command absolutely …

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

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

    Mar 2, 2021 · You can run PowerShell commands from cmd/bat files by passing the commands as an argument to the powershell command. Make you batch file look like this. Note, I have …