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

Re: Checking VM Guests for AV

$
0
0

Hello,

 

You can try something like this .. At first try Get-WmiObject Win32_Product | ? { $_.Name -like "*Forefront*" } locally, i don't have forefront here so i don't know how it's named in Win32_Product list

 

$GuestUser = "Administrator"

$Password = "PutYourPasswordHere"

$Script = '

if (Get-WmiObject Win32_Product | ? { $_.Name -like "*Forefront*" }) {

    Write-Host "Forefront installed"

}

'

 

 

Get-VM | % {

     $VM = $_

         Get-View $_  | % {

        if ( $_.Summary.Guest.GuestFullName -contains "Windows" ) {

            Invoke-VMScript -VM $VM -ScriptText $script -ScriptType Powershell -GuestUser $GuestUser -GuestPassword $Password

        }

    }


Viewing all articles
Browse latest Browse all 189012

Trending Articles