HAL check?!

Posted by Duncan Epping in November 14th, 2008
Published in Management & Automation

My post about reverting your HAL triggered Alanrenouf to create a short, but very cool script that compares the amount of cpu’s to the windows HAL you’ve chosen. This way you will know within a second if you need to change the HAL of any of your vm’s! Cool stuff:

connect-viserver MYVISERVER
$myCol = @()
ForEach ($VM in (Get-VM))
{
$MyDetails = “” | select-Object Name, HAL, NumvCPU
$MYDetails.Name = $VM.Name
$Hal = Get-WmiObject -ComputerName $VM.Name -Query “SELECT * FROM Win32_PnPEntity where ClassGuid = ‘{4D36E966-E325-11CE-BFC1-08002BE10318}’” | Select Name
$MYDetails.HAL = $Hal.Name
$MYDetails.NumvCPU = $VM.NumCPU
$myCol += $MYDetails
}
$myCol


5 user comments or pingbacks in this post

Follow-up this post comment rss or leave a trackback
1. wally said,

Hmm, not the expected result:

ERROR: Access is denied. (Exception from HRESULT: 0×80070005 (E_ACCESSDENIED))

What account is used for the wmi query ?

2. Chris Dearden said,

sounds like a great script although I’m getting Invalid query entries on the get-WMI stage.

3. Chris Dearden said,

Wally,
I found that I had to run powershell under my Domain Admin credentials instead of just loggin into VC with my elevated permisssions.

4. Duncan Epping said,

it needs the domain admin probably to access the other machines…

5. Sven said,

Hi, I get a error

The RPC server is unavailable. (Exception from HRESULT: 0×800706BA)

Leave A Reply Below

Currently browsing HAL check?!

 Username (*required)

 Email Address (*private)

 Website (*optional)

Topics Search

Support me:

Yellow-Bricks recommends VMware Fusion
and VMware Workstation. Support Yellow-Bricks and get a 10% discount on select VMware products.

Recent Comments

Advertisements

Tags

Info