Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Powershell - is there a difference between `& .\monkeys.ps1` and `& powershell .\monkeys.ps1`?

Tags:

powershell

In Powershell, is there a difference between & .\monkeys.ps1 and & powershell .\monkeys.ps1 ?

like image 951
Colonel Panic Avatar asked Mar 04 '26 15:03

Colonel Panic


1 Answers

'& .\monkeys.ps1' executes the script in the current console (session). '& powershell .\monkeys.ps1' opens up a new PowerShell process and executes the script.

like image 115
Shay Levy Avatar answered Mar 07 '26 12:03

Shay Levy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!