i'm trying to get the Snapshot state of my VMs monitored in PRTG. We just upgraded our ESXi Environment to 6.5.
Before the Upgrade everything worked fine. But now i'm getting Errors with the old Skript. I had to upgrade PowerCLI from Version 4 to Version 6.5. So i found this article https://kb.paessler.com/en/topic/29313-vmware-snapshots and tried the Skript. Unfortunately "Add-PSSnapin" doesnt work anymore.
So i changed the Line to "Get-Module -Name VMware* -ListAvailable | Import-Module". If i run it trough PowerShell everything workes fine and i'm able to Connect with the vCenter.
But in my Custom Sensor i get the Error "'connect-viserver' is not recognized as a cmdlet, function, operable program, or script file." It seems the Modules arent loaded yet.
If i change the Line to "Import-Module -Name VMware.VimAutomation.Core", then the following Error appears:
Import-Module : Das erforderliche Modul "VMware.VimAutomation.Cis.Core" ist nicht geladen. Laden Sie das Modul, oder entfernen Sie das Modul aus "RequiredModules" in der Datei "C:\Program Files (x86)\VMware\Infrastructure\Po werCLI\Modules\VMware.VimAutomation.Core\VMware.VimAutomation.Core.psd1
It means "The required Module "VMware.VimAutomation.Cis.Core" isnt loaded. Load the Module or remove the Module from the "RequiredModules" in the File VMware.VimAutomation.Core.psd1"
I'm grateful for every hint, i tried already a lot but i'm not very familiar with PowerShell.