SyntaxFix
Write A Post
Hire A Developer
Questions
if you don't like the double brackets or you don't want to write a function, you can just use a variable.
$path = Test-Path C:\Code if (!$path) { write "it doesn't exist!" }