Need help with basic if-else statement

I’ve tried googling around, but can’t figure out how to get this basic script to work.

if ($env:computername -contains “RENDER025”-or”RENDER026″-or”RENDER027″){

del C:StorageDeviceAnalysisOf$env:computername

}

else {

mkdir C:StorageDeviceAnalysisOf$env:computername

}

The script always appears to run the del command, and never the mkdir command, even when the computername matches any of the 3 names.

Thanks!

submitted by /u/ConsistentOutcome
[link] [comments]

Leave a Reply