I did not use quotes in the command line, so I don't know why it works there but not in the script. I will try to rebuild that script in a way that I can post tomorrow. Who knows, I may stumble across the problem.
I'm also going to try creating a datastore without spaces in the name and see what happens then.
Thanks for the support.