Import host patches into Update Manager

Import host patches into Update Manager

This script imports zip file that contains host patches into Update Manager 4.1.

To use the script:

  1. Copy the file that contains the patches to the machine, where the Update Manager is installed.
  2. Connect to the vSphere server that has this Update Manager server installed on it.
  • $vSphereServer = Connect-VIServer <ip_address_of_the_vSphere_Server>

3.       3. Execute the script.

  • .\ImportPatches41.ps1 $vSphereServer "C:\Patches\myPatches.zip"

Note: The path to zip file must be a local path for Update Manager Service. Providing a network share is not supported.

Attachments
Comments

Wow, that gives us, with a bit of reverse engineering, access to the Update Manager internals !

Hi

I am using this script from long time ,but now i updated my vCenter server and Update manager to 6.5 ,and this script is not working.

it gives error while exporting the patches

03:20:08 Exception calling "ImportFile_Task" with "2" argument(s): "integrity.fault.File
03:20:08 UploadUnsupportedFileLocation"
03:20:08 At C:\jenkins\workspace\promoted-hourly-ESX-bryce-VUM-scsi-esx_6\nodes\esx-vum-
03:20:08 65\esx\vum55\vum-import.ps1:52 char:45
03:20:08 +     $taskMoRef = $vumWebService.ImportFile_Task <<<< ($vumServiceContent.file
03:20:08 UploadManager, $importSpec)
03:20:08     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
03:20:08     + FullyQualifiedErrorId : DotNetMethodException

I got patches and images importing on 6.5. Upload your patch or image to /storage/updatemgr/patch-store-temp/ on the VCSA appliance, then use this as the source path for your file in your script, rather than the local path.

Version history
Revision #:
1 of 1
Last update:
‎05-20-2011 05:42 AM
Updated by: