hi there,
i'm struggling to find out the correct entries to use for outputting the vmware pool settings for number of VDs per pool. I used to have this for get-pool but doesn't register.
something like showing displayname of each pool and next to it have the number of VDs deployed per pool.
im using the get-HVPool command
i tried something like this - (get-hvpool).base (but doesn't give me what i need). Please help.
(get-hvpool).base.name will show the name
and the desktopcount is hidden under
(get-hvpool).automateddesktopdata.vmnamingsettings.patternnamingsettings.maxnumberofmachines
see https://vdc-download.vmware.com/vmwb-repository/dcr-public/3721109b-48a5-4ffb-a0ad-6d6a44f2f288/ff45... for the last one
doing this from the api explorer since I just shut down my lab.
I would recommend doing something like this:
$pools=get-hvpool
$pooldata=@()
foreach ($pool in $pools){
$pooldata+=new-object PSObject -property @{"name" = $pool.base.name;
"maxdesktops"= $pool.automateddesktopdata.vmnamingsettings.patternnamingsettings.maxnumberofmachines;
}
$pooldata
as said the lab is down so can't check it but this should work
Thanks when I try this it outputs the number but not the name of the pool alongside.
I tried - (get-hvpool).base.name.automateddesktopdata.vmnamingsettings.patternnamingsettings.maxnumberofmachines
But that returns nothing.
anyone?
I just need pool name, number of desktops.
that doesn't work, you need to get them separately or join them like I did in my script.
cheers.
your script works well only thing i cant get to output is the dedicated/manual desktop numbers, i imagine this is different from - automateddesktopdata (anyway to incorporate both?)
(I see there's an extra } needed in the script )
manual pools don't have a max number so you need to do a count from get-hvmachine -poolname poolname
thanks - i know im asking a bit much now - but is there a way to output this into e-mail.
i've used this in the past but i couldnt get it to work:
$sMail = @{
From =
To =
Subject = 'VD Pool Numbers Monthly Report'
Body = $body
SMTPServer =
BodyAsHtml = $true
}
Send-MailMessage @sMail
you would need to create the complete html for that OR create your own module for the Horizon View vCheck take a look at the other plugins to see how you can build one yourself
GitHub - vCheckReport/vCheck-HorizonView: vCheck for Horizon View