Use Datastore and Inventory Providers

use this command to get the environment variables
PowerCLI C:\> Get-PSDrive | select name
Name
—-
X
X
vi
vis
vmstore
vmstores

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:10.26.0.223@443DRdatastore1 (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 \10.7.1.42source

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”

Advertisements

About Ahmad Sabry ElGendi

https://www.linkedin.com/pub/ahmad-elgendi/94/223/559
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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s