Use Datastore and Inventory Providers

use this command to get the environment variables
PowerCLI C:\> Get-PSDrive | select name

will show several output , I just care about above ones.
to switch to vmstores as an example:
PowerCLI C:\> Set-Location vmstores:\
PowerCLI vmstores:\>
from here you can start switching till you reach your required destination.

PowerCLI vmstores: (1)XP-02> Copy-DatastoreItem .XP-02.vmx -Destination C:

Navigating till data store level

This is how to jump between data stores:

PowerCLI vmstores:> Get-Datastore | SELECT DatastoreBrowserPath, Name |FT -AutoSize

Copy file from DS to another:

From GUI:

You can create PSDrive for a share location

PowerCLI vmstores:> New-PSDrive -Name 1 -PSProvider FileSystem -Root \

PowerCLI vmstores:> cd 1:

PowerCLI 1:> dir

Map to my desktop with drive named 2:

PowerCLI 1:> New-PSDrive -Name 2 -PSProvider Filesystem -Root “C:UsersaelgendiDesktop” -Description “Mapping to my Desktop”


About Ahmad Sabry ElGendi
This entry was posted in VCAP5-DCA, Vmware. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s