Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 244951

Re: Get VM Serial Number from List of VM's?

$
0
0

EDIT:  That did the trick.  For some reason it looks like I was losing my connection to the vCenter servers which may have contributed to the error.  This is exactly what I needed.  Thank you for your help.

 

Correct, it looks like:

 

Name

VM1

VM2

VM3

VM4

..VM250

 

Your code fixed the ServerName1 = ServerNameX issue, however now it just returns the errors below:

 

Get-VM : 2/13/2013 1:46:26 PM    Get-VM        VM with name 'ServerNameX' was not found using the specified filter(s).
At line:1 char:1
+ Get-VM (Import-CSV C:\VMList.csv | Select -ExpandProperty Name) | Select Name,BI ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (:) [Get-VM], VimException
    + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM


Viewing all articles
Browse latest Browse all 244951

Trending Articles