PowerShell Boolean Comparison This topic contains 3 replies, has 4 voices, and was last updated by Stephanos Constantinou 1 day, 9 hours ago. Author Posts April 17, 2018 at 3:42 am #98994 Wayne HoggettParticipant Quick question, what does the community prefer or consider a best practice/community standard for checking if something is not true? i.e. boolean comparison if (-Not (Test-Path "C:\Temp")) OR if (!(Test-Path "C:\Temp")) OR if ((Test-Path "C:\Temp") -eq $false) OR something else? April 17, 2018 at 8:16 am #99004 Dave BrannanParticipant I personally do the first as I find it easier to read and for others to understand what the code is testing for. Dave. April 17, 2018 at 1:38 pm #99028 Joel SallowParticipant I would also opt for the first, but the second isn't bad either. They're pretty much equivalent, but someone unfamiliar with programming may find the first easier to understand. April 18, 2018 at 11:06 am #99154 Stephanos ConstantinouParticipant I am also going for the first one. It gives others better understanding. If the script is only for myself, I might use the second option as well. Author Posts You must be logged in to reply to this topic.