About 513,000 results
Open links in new tab
  1. windows - How to run a PowerShell script - Stack Overflow

    Or: you can run the PowerShell script from the Command Prompt (cmd.exe) like this: powershell -noexit "& ""C:\my_path\yada_yada\run_import_script.ps1""" (enter) according to Invoking a …

  2. windows - How to run PowerShell in CMD - Stack Overflow

    I'm trying to run a PowerShell script inside cmd command line. Someone gave me an example and it worked: powershell.exe -noexit "& 'c:\Data\ScheduledScripts\ShutdownVM.ps1'" But the …

  3. How to run a Powershell script from the command line and pass a ...

    Dec 5, 2012 · Using the flag -Command you can execute your entire powershell line as if it was a command in the PowerShell prompt: powershell -Command "& '<PATH_TO_PS1_FILE>' …

  4. Running CMD command in PowerShell - Stack Overflow

    One solution would be to pipe your command from PowerShell to CMD. Running the following command will pipe the notepad.exe command over to CMD, which will then open the Notepad …

  5. How to run powershell script from .ps1 file? - Stack Overflow

    Oct 23, 2019 · There are several ways to run a .ps1 file. The simplest way is to right-click the file and choose 'Run with PowerShell'. As others have suggested, you can also run your .ps1 file …

  6. command line - How can I pass an argument to a PowerShell …

    It is executed with a prompt line command: powershell.exe itunesForward.ps1 Is it possible to pass an argument from the command line and have it applied in the script instead of the …

  7. powershell - How to enter a multi-line command - Stack Overflow

    Jul 13, 2010 · I assume you're talking about on the command-line - if it's in a script, then a new-line >acts as a command delimiter. On the command line, use a semi-colon ';' For example: …

  8. Running PowerShell as another user, and launching a script

    Mar 11, 2015 · <# .SYNOPSIS Run command as another user. .DESCRIPTION Run batch or PowerShell command as another user. .PARAMETER Command The batch command you'd …

  9. Windows Powershell policy execution bypass - Stack Overflow

    Apr 26, 2021 · Run a Single Script with the Bypass Policy. If you need to execute an unsigned script that doesn’t adhere to the current session's execution policy, use the following …

  10. Calling a specific PowerShell function from the command line

    Jan 23, 2015 · Dotting a script will both load and execute the script within that scope without creating a new, nested scope. With functions, this has the benefit that they stick around after …

Refresh