VMware Cloud Community
spandey6
Contributor
Contributor

Importing Patches

Hey Everyone,

I wanted to know if there was a way of importing patches manually to the Repository using a powerCLI command. I wanted to attach it to the baseline using a script as well.

Thanks in advance

Reply
0 Kudos
3 Replies
vCloud9
Enthusiast
Enthusiast

I stumbled upon this nice blog, which walks you through to scan and remediate the hosts through PowerCLI. http://theithollow.com/2012/05/

-vCloud9

Please don't forget to award point for 'Correct' or 'Helpful', if you found the comment useful.
Reply
0 Kudos
spandey6
Contributor
Contributor

I was looking something like this

New-PatchBaseline -Name Baseline -Description "This is my first baseline" -Static -IncludePatch $patches -TargetType Host

where $patches is .zip file on the C drive. I know you can import external patches using the vum, but I was looking for power cli.

P.S - I tried giving a file path for the patch and it returned this error. " Cannot convert System.string to type VMware.VumAutomation.Types.Patch

Reply
0 Kudos
LucD
Leadership
Leadership

Aren't you confusing this with the Install-VMHostPatch cmdlet ?

That cmdlet allows you to specify a .zip file on the LocalPath or WebPath parameters.

The IncludePatch parameter on the New-PatchBaseline allows you to specify patches that you retrieved with the Get-Patch cmdlet.

See the examples on the New-PatchBaseline cmdlet.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos