Automation

 View Only
  • 1.  Getting detailed OS SPs and patch levels

    Posted Mar 24, 2015 12:23 PM

    Hi all,

    I am looking to find a way to extract the detailed operating system information using powercli (Windows and Linux)

    When I run get-vmguest - vm vmname | fl , I only get the select OS.  Is there a way to get the WIndows SP level, patches, etc.  Also, can the same be done for Linux VMs?

    Is there a way to get the installed applications also? (I know this one is a long shot, but shooting it out there)

    Thanks for the help,

    Mike



  • 2.  RE: Getting detailed OS SPs and patch levels
    Best Answer

    Posted Mar 24, 2015 02:17 PM

    That kind of information is not available through the Get-VMGuest cmdet I'm afraid.

    You can use the Invoke-VMScript cmdlet to start a script inside the guest OS, and query the required information from there.

    For Windows boxes you can use WMI to get the Service Pack

    Get-WmiObject win32_operatingsystem | Select-Object Name,ServicePackMajorVersion,ServicePackMinorVersion

    Or the following cmdlet to get the patches.

    Get-HotFix

    For *nix boxes it depends on the *niox flavour what to use. For a SLES box you could for example use

    SPident -vv



    For an application list it is similar.

    On Windows boxes you can do

    Get-WmiObject -Class Win32_Product



    On *nix boxes you can consider doing a

    rpm -qa



  • 3.  RE: Getting detailed OS SPs and patch levels

    Posted Mar 24, 2015 05:26 PM

    Thanks LucD....

    I will try these and see what else I can use with some other tools we have.

    Your answers are always helpful!