conditional execution (&& and ||) in powershell
2019: the Powershell team are considering adding support for && to Powershell – weigh in at this GitHub PR Try this: $(command -arg1 -arg2 | Out-Host;$?) -and $(command2 -arg1 | Out-Host;$?) The $() is a subexpression allowing you to specify multiple statements within including a pipeline. Then execute the command and pipe to Out-Host so … Read more