I'm not sure which CreateInventory.ps1 script you are running (I cannot find that in the Fling).
The problem seems to be the quoting that you have in there.
Can you attach the script that you are using?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference