You can use the 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.
|