What's New in PowerCLI 5.0

Post on 24-May-2015

4.328 views 1 download

Tags:

description

What's New in PowerCLI 5.0

Transcript of What's New in PowerCLI 5.0

What’s New In PowerCLI 5.0Jonathan Medd

Also known as…..

What’s New in PowerCLI 4.1 and 5.0 in the 2nd half of 2011

New in PowerCLI 5.0 Summary• License Manager snapin• Image Builder Snapin• Auto Deploy Snapin• Update Manager PowerCLI 5.0• No change to View PowerCLI• Support for new vSphere 5.0

features, such as Storage DRS• Incremental updates to existing

cmdlets

PowerCLI 5.0 Summary

Also new in 2nd half of 2011

• VI Property Module• vSphere Distributed Switch

PowerCLI Snapin released as a Fling• PowerCLIMan

License Manager Snapin

• Requires vCenter 5.0 or later• Currently contains one cmdlet, Get-

LicenseDataManager• Add.PSSnapin

VMware.VimAutomation.License

Get-LicenseDataManager Examples

1) Query Licenses$licenseDataManager = Get-LicenseDataManager$licenseDataManager.QueryEntityLicenseData()

2) Add Licenses$licenseData = New-Object VMware.VimAutomation.License.Types.LicenseData

$licenseKeyEntry = New-Object Vmware.VimAutomation.License.Types.LicenseKeyEntry$licenseKeyEntry.TypeId = "vmware-vsphere”$licenseKeyEntry.LicenseKey = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"

$licenseData.LicenseKeys += $licenseKeyEntry

$licenseDataManager.UpdateAssociatedLicenseData($hostContainer.Uid, $licenseData)

Image Builder

Image Builder

Image Builder

Image Builder Snapin

• Requires vCenter 5.0 or later• Contains cmdlets for managing depots, image

profiles, and VIBs• Add.PSSnapin VMware.ImageBuilder

Image Builder

Image Builder

Image Builder

AutoDeploy

AutoDeploy Snapin

• Requires vCenter 5.0 or later• Contains cmdlets that provide an interface to

VMware Auto Deploy for provisioning physical hosts with ESXi software

• Add.PSSnapin VMware.DeployAutomation

Auto Deploy & Image Builder – where’s the GUI?• There is no GUI (yet) for managing either Auto

Deploy or Image Builder• Time to learn PowerShell!• Or……

Image Builder and Auto Deploy PowerPack

• Alan Renouf has created a PowerGUI PowerPack for Image Builder and Auto Deploy

• http://www.virtu-al.net/2011/09/15/image-builder-and-auto-deploy-powerpack/

Image Builder and Auto Deploy Demo

Update Manager PowerCLI 5.0

• Requires vCenter 5.0 or later• Does NOT work with downlevel versions of

vCenter – similar to previous releases• Update Manager PowerCLI 4.x will not work

with Update Manager 5.0

Update Manager PowerCLI 5.0 – What’s New?

vSphere 5.0 New Features - PowerCLI Support

• Storage DRS (experimental)• Creating virtual machines and hard disks on

datastore clusters and defining anti-affinity rules

• ESXi Firewall

PowerCLI 5.0 – Incremental Updates

· Cloning templates with New-Template. · Copying files and folders from and to the guest operating system through the Copy-VMGuestFile cmdlet. · Joining domains through the Get-VMHostAuthentication and Set-VMHostAuthentication cmdlets. · Joining ESX hosts (version 4.1 and later) into an active directory through the Get-VMHostAuthentication and Set-VMHostAuthentication cmdlets. · Retrieving vCenter Server users and groups through the Get-VIAccount cmdlet. · Support for vCenter Servers in linked mode through the Connect-VIServer cmdlet. · Retrieving object properties through the Get-VIProperty cmdlet. · Moving virtual appliances through the Move-VApp cmdlets. · Importing compressed and chunked files through the Import-VApp cmdlet. · Importing and exporting virtual appliances in OVA format. · Support for the SSPI passthrough feature of VIX.

Also new in 2nd half of 2011

• VI Property Module• vSphere Distributed Switch

PowerCLI Snapin released as a Fling• PowerCLIMan

What is a PowerShell Module?

• A collection of files containing functions, scripts etc and possibly other files such as the manifest to make it more professional

• Stored within a folder as a subfolder of the Modules location. Can be found via $env:PSModulePath

• Contents made accessible to the user via the Import-Module cmdlet

Why Bother with a PowerShell Module?

• Makes sharing of groups of functions and scripts easy• Simple XCOPY style deployment of the module folder either internally or

publishing to an external website• Make your commonly used functions available to yourself without ‘Profile

Bloat’ – they are available as and when you need them from a module

VI Property Module

• Currently contains 47 custom VI Properties• Expanding in number all the time• Maintained at www.lucd.info

What is a VI Property?

• Create custom properties that persist per PowerCLI session

VI Property Module• New cmdlet Get-VIProperty displays VI Properties in existing session• Module contains VI properties for:

– Cluster– Datastore– Harddisk– PhysicalNic– Portgroup– ScsiControler– ScsiLun– Snapshot– VirtualMachine– VMHost

Create your own and submit them for addition to the module.

vSphere Distributed Switch PowerCLI cmdlets

• The no.1 most requested missing feature from PowerCLI

• Community effort from LucD to fill the gap• Community effort available as a module in the

PowerCLI Book• Now released as a snapin as a VMware Fling• So NOT supported (yet)

– Does not work with PowerCLI 5.0 (yet)– 32bit only

vSphere Distributed Switch PowerCLI cmdlets

vSphere Distributed Switch PowerCLI cmdlets

PowerCLI 5.0 Poster