This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Modules VMware.VimAutomation.Core | |
#Requires -Modules VMware.VumAutomation | |
function InitializeVUMService ([VMware.VimAutomation.ViCore.Types.V1.VIServer] $vSphereServer) { | |
$serviceInstance = Get-View ServiceInstance -Server $vSphereServer | |
$extensionMgr = Get-View $serviceInstance.Content.ExtensionManager -Server $vSphereServer | |
$vumExtension = $extensionMgr.FindExtension("com.vmware.vcIntegrity") | |
if ($vumExtension -eq $null) { | |
throw New-Object System.Exception -ArgumentList "Update Manager extension is not found for vSphere Server '$($server.Name)'" | |
} |