Home > Blogs > VMware PowerCLI Blog > Monthly Archives: March 2010

Monthly Archives: March 2010

Find out how many VMs you’re creating a month with this simple script.

If you haven’t seen it, Alan Renouf has made a great script called “Who created that VM?” that populates custom variables to tell you who created a VM and when they did it.

I was showing this to a user the other day and they noticed they could also use this to figure out how many VMs they’re creating a month and help track their growth rate that way. Sure enough, once you’ve run Alan’s script it’s really easy to get just such a report.

 

Here’s a sample of the script in action against my vCenter.

blog1

You can also export this stuff to a spreadsheet, just follow the sample code above.

Now Available: PowerCLI cmdlets for vCenter Update Manager!

I’m happy to announce that we’ve released PowerCLI cmdlets for Update Manager, a.k.a. VUM, that are compatible with PowerCLI 4.0 U1. This new PowerShell snapin provides 13 cmdlets as follows:

Cmdlet Name

Cmdlet Description

Attach-Baseline

Attaches baselines to the specified Template, VirtualMachine, VMHost, Cluster, Datacenter, Folder, and VApp objects.

Attaching a baseline to a container object such as a folder or datacenter transitively attaches the baseline to all objects in the container.

Detach-Baseline

Detaches baselines from the specified inventory objects.

Download-Patch

Downloads new patches into the Update Manager patch repository from the enabled patch download sources.

Get-Baseline

Retrieves the baselines specified by the provided cmdlet

parameters.

Get-Compliance

Retrieve baseline compliance data for the specified object of type Template, VirtualMachine, VMHost, Cluster, Datacenter, Folder, and VApp.

Get-Patch

Retrieves all available patches or those specified by the provided cmdlet parameters.

Get-PatchBaseline

Retrieves all  patch baselines or those specified by the provided cmdlet parameters.

New-PatchBaseline

Creates a new patch baseline. Patch baselines can be applied to either hosts or virtual machines. Depending on the patch criteria you select, patch baselines can be either dynamic or static (fixed).

Remediate-Inventory

Remediates an inventory object against the specified baselines.

Remove-Baseline

Deletes the specified baselines from their servers. Before the

removal, the baselines are detached from all entities they have been attached to.

Scan-Inventory

Scans inventory objects for baselines attached to them.

Set-PatchBaseline

Modifies the properties of a patch baseline. You can specify explicitly the patches you want to include in the baseline through the IncludePatch parameter.

Stage-Patch

Initializes staging of patches. Staging allows you to download

patches from the Update Manager server to the ESX/ESXi hosts, without applying the patches immediately.

Download the VUM PowerCLI cmdlets now, remember you will also need PowerCLI 4.0 U1.