Seems to be working for me (PS v5.1, PowerCLI 10.1.0 on Win10).
Which versions and platform are you using?
Thank you very much for your assistance.
I think, i figured out the issue was caused because of variable defined
$date = Get-Date -format dd-MMM-yyyy_HH:mm:ss_tt
after changing the variable to
$Today = Get-Date -format dd-MMM-yyyy-HH-mm-ss-tt
It worked. Not sure, what caused error