Windows 10: Run Multiple Commands In Powershell?

Discus and support Run Multiple Commands In Powershell? in Windows 10 Performance & Maintenance to solve the problem; Hi, I have three drives in my PC. Two of them are SSD's and the third one is a mechanical HDD. I like to optimize them using Powershell. However, as... Discussion in 'Windows 10 Performance & Maintenance' started by Geosammy, May 6, 2018.

  1. Geosammy Win User

    Run Multiple Commands In Powershell?


    Hi,

    I have three drives in my PC.
    Two of them are SSD's and the third one is a mechanical HDD.
    I like to optimize them using Powershell.

    However, as it stands now.
    I'm running the commands separately for each of my drive, i.e.

    1.) Optimize-Volume -DriveLetter C -ReTrim -Verbose
    For optimizing the (M.2 NVME) C:\ drive.

    2 .) Optimize-Volume -DriveLetter D -Verbose
    To optimize the (Mechanical HDD) D:\ drive.

    3.)Optimize-Volume -DriveLetter E -ReTrim -Verbose
    For the (SSD 850 EVO) E:\ drive.

    Is there a way to combine these 3 commands into one command.
    Which will run in Powershell.
    Without having to enter/type each of the commands separately?

    Thanks.

    :)
     
    Geosammy, May 6, 2018
    #1
Thema:

Run Multiple Commands In Powershell?

Loading...
  1. Run Multiple Commands In Powershell? - Similar Threads - Run Multiple Commands

  2. Command Prompt And PowerShell Run Automatically On Reboot

    in AntiVirus, Firewalls and System Security
    Command Prompt And PowerShell Run Automatically On Reboot: The last 3 times I've rebooted, I notice that the first thing to run is CMD.exe open window and if I do not immediately stop it, it launches I suspect command prompt lauches it PowerShell which runs a script open window and they both will close.I also suspect this is a virus...
  3. Error while running PIP3 command on powershell

    in Windows 10 Gaming
    Error while running PIP3 command on powershell: Please assist me to sort out the issue on the below screenshot.The command is 100% correct because I ran it on another computer it is working.I'm getting error that " the term pip3 is not recognized "I have seen all the differences of pip vs pip3 as well.I am wondering if i...
  4. Powershell can't run appx commands

    in Windows 10 BSOD Crashes and Debugging
    Powershell can't run appx commands: So a few windows processes are hogging up all my memory and cpu such as the gaming services which I never use I do play Minecraft java But I doubt it uses gaming services. So I wanted to get rid of those. I tried running some appx commands which were given on the forum And...
  5. Powershell can't run appx commands

    in Windows 10 Gaming
    Powershell can't run appx commands: So a few windows processes are hogging up all my memory and cpu such as the gaming services which I never use I do play Minecraft java But I doubt it uses gaming services. So I wanted to get rid of those. I tried running some appx commands which were given on the forum And...
  6. Powershell can't run appx commands

    in Windows 10 Software and Apps
    Powershell can't run appx commands: So a few windows processes are hogging up all my memory and cpu such as the gaming services which I never use I do play Minecraft java But I doubt it uses gaming services. So I wanted to get rid of those. I tried running some appx commands which were given on the forum And...
  7. Error while running PIP command on powershell

    in Windows 10 Customization
    Error while running PIP command on powershell: Please assist me to sort out the issue on the below screenshot. The command is 100% correct because I ran it on another computer it is working. [ATTACH] I am wondering if i can post powershell issues here or there is another website specific for powershell problems...
  8. run a powershell command like a batch file

    in Windows 10 Installation and Upgrade
    run a powershell command like a batch file: I am working as a temp on a Windows 7 to Windows 10 migration team. We've encountered a problem with some software, and a solution has been found that requires us to execute a a single command with PowerShell. However, the command is extremely long and complex, and very...
  9. Syntax for Batch file &/or powershell script to run multiple commands

    in Windows 10 Support
    Syntax for Batch file &/or powershell script to run multiple commands: I wanted a batch file to run the following commands: Start Powershell as administrator cd "C:\Program Files\Macrium\Reflect" regsvr32 RContextMenu.dll regsvr32 RShellEx.dll I can get as far as: Code: echo Start "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" cd...
  10. Run Multiple Commands In Powershell?

    in Windows 10 Performance & Maintenance
    Run Multiple Commands In Powershell?: Good job, @lx07. Of course, you had the benefit of knowing the OP wanted to run the same command on 3 targets. Had I been armed with that same information, I might have made that same suggestion, too. That's why we're better working together than working individually. --Ed--

Users found this page by searching for:

  1. running multiple powershell commands at once

    ,
  2. run multiple powersell commands