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

Re: Index was outside the bounds of the array - Get-VirtualPortGroup

$
0
0

Ok, perhaps I wasn't too clear.

The intention was that you insert those lines in your original script, and that we could monitor the increasing consumption of PM and catch the exception when it goes wrong.

Something like this

 

&{foreach($swin (Get-VirtualSwitch-Standard)){
 
foreach($VPGin&{
   
Get-Process-Id$PID
   
Try {
     
Get-VirtualPortGroup-VirtualSwitch$sw
    }
   
Catch {
     
Get-Process-Id$PID
     
$_|Select*
     
$_.Exception.InnerException|Select*
    }}){
   
$VPG
   
# The rest of your original script

}}}

Viewing all articles
Browse latest Browse all 192300

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>