Hey,
The VMware vSphere PowerCLI User's Guide says:
Create a New Custom Datastore Drive
You can use the vSphere PowerCLI Datastore Provider to create custom datastore drives.
Prerequisites
Verify that you are connected to a vCenter Server system.
Procedure
1. Get a datastore by its name and assign it to the $datastore variable.
$datastore = Get-Datastore Storage1
2. Create a new PowerShell drive ds: in $datastore.
New-PSDrive -Location $datastore -Name ds -PSProvider VimDatastore -Root '\'
Note You can use the New-PSDrive cmdlet, which is an alias of New-DatastoreDrive. It creates a new
datastore drive using the Name and Datastore parameters.
For example: Get-Datastore Storage1 | New-DatastoreDrive -Name ds
Chapter 5 Sample Scripts for Managing vSphere with VMware vSphere PowerCLI
The New-PSDrive with the -Location parameter has just flat stopped working for us. Does anyone know how to get this working?
Here's our PowerCLI version info:
PowerCLI Version
----------------
VMware vSphere PowerCLI 5.1 Release 1 build 793510
---------------
Snapin Versions
---------------
VMWare AutoDeploy PowerCLI Component 5.1 build 768137
VMWare ImageBuilder PowerCLI Component 5.1 build 768137
VMware License PowerCLI Component 5.1 build 669840
VMware vSphere PowerCLI Component 5.1 build 793489