Most likely you do not have the folder pre-created before you execute the command:
$firstNode.ImagePath = "My computer\C\hastorage4"
Make sure you have a folder called hastorage4 on the c:\ of your machine.
The Latest Gartner® Magic Quadrant™Hyperconverged Infrastructure Software