VMware Cloud Community
scriptermad
Enthusiast
Enthusiast

Get list of VM's from file

Hi

I am trying to stop some VM's in vCD using a txt file.

I am doing the following

1. Connecting to vCD

2. $vmlist = get-contect c:\vms,txt

3. $vms = get-civm $vmlist  

But the last command gives an error "CIVM with name 'correct vm name read from file' was not found using the specified filter

Any idea how to run script to shut down VM's in vCD ?

0 Kudos
1 Reply
LucD
Leadership
Leadership

Could you share a screenshot of that session?

That error ('correct vm name read from file') looks as if a prompt or comment was passed as a VM name.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos