Quantcast
Channel: VMware Communities : Discussion List - Automation Tools
Viewing all articles
Browse latest Browse all 9071

PowerCLI Script for UNMAP Specific Datastores

$
0
0

Hello All,

 

Before i come to my question, let me explain my Environment.

 

  • 1 Datacenter
  • 4 Cluster
    • Cluster1
      • 2 Host
    • Cluster2
      • 2 Host
    • Cluster3
      • 3 Host
    • Cluster4
      • 5 Host
  • 70 Datastores

 

I wanted powercli script to run the esxcli command for unamp on Specific Datastores.


Here is what i have done so far:


 

After this, i and not able to get ahead. here is i want to achieve:

 

  1. Script Runs
  2. Connect to vCenter Server
  3. Get all the Host under the Cluster 4 (There are 5 host)
  4. Connect to one of the Host (part of the Cluster 4) which has Lowest Memory Usage.
  5. Once Connected
  6. List all the Datastore, whose names begin with " VDIDS* "
  7. Start running "ESXCli Command on all the datastore, whose name starts with VDIDS.
  8. Save the Log with the info about being successful or not.

 

Can someone please help,


Viewing all articles
Browse latest Browse all 9071

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>