L
after fixing a few things that works on my env. I ended with the following:
foreach ($session in $sessions){
if($session.NamesData.DesktopName -eq "$Poolname"){
$sessionId = $session.Id
Write-Host "Connection to $Poolname found: " $session.username
$hvservices.session.Session_SendMessage($sessionid,"INFO","We are performing a disk expansion on the IO VDI pool, we would like this to happen as soon as the CHG is approved")
}
}
But I get the following error:
Exception calling "Session_SendMessages" with "3" argument(s): "ExceptionType : VMware.Hv.SecurityError
ErrorMessage : Session is not authenticated"
At line:8 char:7
+ $hvservices.session.Session_SendMessages($sessionid,"INFO","We ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : VimException
what am I missing
Thanks a bunchhh