About 14,100,000 results
Open links in new tab
  1. Calling a specific PowerShell function from the command line

    Jan 23, 2015 · How do I invoke a specific function from the command line? This doesn't work: You would typically "dot" the script into scope (global, another script, within a scriptblock). Dotting a …

  2. Running commands in the shell - PowerShell | Microsoft Learn

    The Start-Process cmdlet can be used to run native commands, but should only be used when you need to control how the command is executed. The cmdlet has parameters to support the …

  3. Run cmd from a given folder inside PowerShell script

    Oct 25, 2016 · Is there any possibility to run a cmd command from a different folder then the script home location (e.g. C:\ScriptHome)? I mean e.g. Basically, it can be done in pure cmd, like cd …

  4. How can I call a PowerShell script as a particular user from the ...

    Aug 12, 2014 · There are a few ways to run a program or script as another user from within a script: The Windows Command Line RUNAS command would look like a good solution to your …

  5. Invoke-Command (Microsoft.PowerShell.Core) - PowerShell

    The Invoke-Command cmdlet runs commands on a local or remote computer and returns all output from the commands, including errors. Using a single Invoke-Command command, you …

  6. PowerShell Run As Different User: A Quick Guide

    To run a PowerShell script or command as a different user, use the `Runas` command with the `/user` flag to specify the username, as shown in the following example: Start-Process …

  7. How can I run a Powershell command from a folder? - Super User

    May 31, 2024 · 1. Create a powershell script. The first command/cmdlet will be go to that folder: cd c:\path\to\your\folder. 2. Then, the other powershell commands to rename the files. Save …

  8. How to Run CMD Commands in PowerShell - Delft Stack

    Feb 12, 2024 · In this script, we employ the Invocation Operator & to seamlessly execute a CMD command within PowerShell. Firstly, we call upon cmd.exe, the designated executable for the …

  9. Run Powershell Script and tell it to run a specific function defined

    Jul 6, 2020 · Run a command either remotely or locally which calls the script and then tells it to run a specific function that is defined in the script: C:Scripts\My_Script.ps1 -A where the -A …

  10. How-to Run a PowerShell Script – All Options Explained

    Dec 21, 2021 · There are a couple of options when it comes to running PowerShell scripts, simply from the cmd, using the PowerShell ISE, or even a scheduled task. In this article, I will explain …

  11. Some results have been removed
Refresh