header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Anyone using the VMware vSphere PowerCLI?
Last Post 17 Sep 2009 03:59 AM by Ackros. 7 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Karl MitschkeUser is Offline
Basic Member
Basic Member
Posts:451
Avatar

--
05 Aug 2009 07:56 AM
    I have a project to document all of our servers - physical, blade chassis, and virtual - I am attempting to use the VMware vSphere PowerCLI to gather information on our VMWare infrastructure.

    However, I cannot see a way to discover the VI servers - there is a cmdlet "Connect-VIServer" - but you need to know which server to connect to.

    I don't know what VI servers we have, and cannot rely on having an up to date list of them - I need to create that list.

    Is there a way to discover the VI servers?

    Thanks

    Karl
    http://unlockpowershell.wordpress.com
    Co-Author, Windows PowerShell 2.0 Bible
    -join("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
    halr9000User is Offline
    PowerShell MVP, Site Admin
    Advanced Member
    Advanced Member
    Posts:565
    Avatar

    --
    05 Aug 2009 08:47 AM
    Karl,

    1. Yes, I use it, and wrote the book on it.
    2. All the PowerCLI geeks hang out on the Windows Toolkit forum on vmware.com. I happen to be in both, but you will get a more focused group over there. (And I refer people there to come here for general PS stuff...)
    3. You have to start somewhere...Do you use vCenter? If so, that would be your point-of-entry. Use Connect-VIServer , and then simply use Get-VMHost to return the host servers, and Get-VM to return the VMs themselves.

    If you don't use vCenter, then I would seriously investigate doing so for several reasons, not the least of which is that this is just the sort of thing for which it was made.

    HTH
    Community Director, PowerShellCommunity.org
    Co-host, PowerScripting Podcast
    Author, TechProsaic
    Karl MitschkeUser is Offline
    Basic Member
    Basic Member
    Posts:451
    Avatar

    --
    05 Aug 2009 09:33 AM
    I don't know if we use vCenter - my VI guy os out till mid month and my deadline for the server inventory project is end of month, so I am trying to get a jump on it.

    I will check in at the Windows Toolkit forum on vmware.com

    Karl
    http://unlockpowershell.wordpress.com
    Co-Author, Windows PowerShell 2.0 Bible
    -join("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
    halr9000User is Offline
    PowerShell MVP, Site Admin
    Advanced Member
    Advanced Member
    Posts:565
    Avatar

    --
    05 Aug 2009 09:59 AM
    You could do some sort of network scan and look for certain open ports. Grab NMAP and play around with it first by scanning one box and see what ports are open and then use that as your template to look at a whole subnet.
    Community Director, PowerShellCommunity.org
    Co-host, PowerScripting Podcast
    Author, TechProsaic
    Karl MitschkeUser is Offline
    Basic Member
    Basic Member
    Posts:451
    Avatar

    --
    05 Aug 2009 10:20 AM
    Hal;

    I could do that, except that I only care about certain vmware servers (Ones my group is responsible for)

    Like a typical user, I didn't mention that part of my requirements :)

    I was hoping you'd pop back to my original post with a "Get-ViServer test*" or something like that :)
    http://unlockpowershell.wordpress.com
    Co-Author, Windows PowerShell 2.0 Bible
    -join("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
    Karl MitschkeUser is Offline
    Basic Member
    Basic Member
    Posts:451
    Avatar

    --
    07 Aug 2009 03:16 PM
    I found out I can connect to my VIC, and it will report on all 438 servers on our 28 hosts :)
    http://unlockpowershell.wordpress.com
    Co-Author, Windows PowerShell 2.0 Bible
    -join("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
    AckrosUser is Offline
    New Member
    New Member
    Posts:10
    Avatar

    --
    17 Sep 2009 01:02 AM
    yeah connecting to the vCenter host or ip and then using

    get-vmhost

    will return all ESX host servers

    get-inventory > all-inv.txt

    will dump all info on all esx hosts, vms into a txt file


    if you know names of some of the VMs you specifically want info on

    try pointing browser to that esx host and get the VI Client for windows.

    AckrosUser is Offline
    New Member
    New Member
    Posts:10
    Avatar

    --
    17 Sep 2009 03:59 AM
    ooh and the ports required from client to vCenter are 80, 443, 902, 903

    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer