Windows – How to run multiple commands on one line in PowerShell

command linepowershellwindows

In a cmd prompt, you can run two commands on one line like so:

ipconfig /release & ipconfig /renew

When I run this command in PowerShell, I get:

Ampersand not allowed. The `&` operator is reserved for future use

Does PowerShell have an operator that allows me to quickly produce the equivalent of & in a cmd prompt?

Any method of running two commands in one line will do. I know that I can make a script, but I'm looking for something a little more off the cuff.

Best Answer

Use a semicolon to chain commands in PowerShell:

ipconfig /release; ipconfig /renew