Install and configure Update Manager PowerShell Library

Get all commands related to update manager

PowerCLI C:> Get-Command -PSSnapin vmware.VumAutomation

Downloading Patches :

PowerCLI C:> Get-VM | Where-Object {$_.Name -like "WSUS*"}

PowerCLI C:> Scan-Inventory -Entity WSUS-DR

You can search in data range for updates:

PowerCLI C:> Get-Patch -Severity critical -After 01.01.2014 -Before 01.05.2015

PowerCLI C:> Get-Patch -Severity critical -After 01.01.2014 -Before 01.05.2015 |more

PowerCLI C:> Get-Patch -Severity important -After 01.01.2014 -Before 01.05.2015 |more

Creating Patch Baselines:

PowerCLI C:> Get-Patch -SearchPhrase "esxi" -Severity critical -After 01.01.2015 | FL

PowerCLI C:> $hostPatches2015= Get-Patch -SearchPhrase "esxi" -Severity critical -After 01.01.2015

Test variable:

PowerCLI C:> $StaticBaseline2015ESXi= New-PatchBaseline -static -Name "Static 2015 Baseline" -IncludePatch $hostPatches2015

From GUI:

$DynamicImportantBaseline= New-PatchBaseline -Dynamic -Name "Dynamic 2015 Important" -SearchPatchSeverity Important -SearchPatchStartDate 01.01.2015

GUI:

PowerCLI C:> $extensions= Get-Patch -BundleType Extension -After 01.01.2014

PowerCLI C:> $Rollup= Get-Patch -BundleType Rollup -After 01.01.2014

PowerCLI C:> New-PatchBaseline -Static -Name "Extensions 2015 Baseline" -IncludePatch $extensions

PowerCLI C:> New-PatchBaseline -Static -Name "Rollups 2015 Baseline" -IncludePatch $Rollup

GUI:

Scan Hardware Upgrade and Vmware tools for all youe Vsphere system:

$poweredOff= Get-VM | Where-Object {$_.PowerState -eq "PoweredOff"}

$Task= Scan-Inventory -Entity $poweredOff -UpdateType VmHardwareUpgrade, VmtoolsUpgrade

NB: you can use -RunAsync to do the hardware and vmotools upgrade:

Advertisements

About Ahmad Sabry ElGendi

https://www.linkedin.com/pub/ahmad-elgendi/94/223/559
This entry was posted in Uncategorized, VCAP5-DCA, Vmware. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s