You almost had it with Not . It should be: if (-Not (Test-Path C:\Code)) { write "it doesn't exist!" } You can also use !
確定! 回上一頁