hi all!
I'm having difficulties in writing some powercli script to create a folder on a datastore... we've got a mixture of ESX 3.5, 4.0 and 4.1 hosts, using NFS mounted datastores.
For some work I am doing, I need to:
1) create a folder on a datastore (checking that the folder doesn't already exist),
2) change directory to the folder
3) and check to see if a particular file exists in that folder.
The problem is that the context of my current location makes the code not work; the get-location method returns "C:\temp\ESX", being the folder that I'm running the test script from. I try using set-location with various parameters to try to change the location to a particular datastore, but it doesn't seem to work- get-location still returns "C:\temp\ESX".
I believe the code for step 3) above is ok, but I can't get any code to work for 1) and 2).
can someone please help?!
thanks,
Ross.