Execute multiple Powershell commands on one line

To execute multiple commands in Windows PowerShell (a scripting language of Microsoft Windows), simply use a semicolon.

An example can be this:

Stop-Process -Name notepad; Move-Item c:\pdf1\*.zip c:\pdf2

 

Author Bio

Thank you for your interest in my blog! On this miniblog, I write mostly short (technical) blog posts that might interest other people. Read more about me or feel free to contact me.

 

4 thoughts on “Execute multiple Powershell commands on one line

  1. Hi, I want to run 3 powershell scripts in sequence while each powershell has its own action and consecutive script should run when previous script is done running. can you please suggest how to achieve that ?

Leave a Reply

Your email address will not be published. Required fields are marked *