New Features in PowerCLI 6.0 R3

Easy Livin'

PowerCLI and Storage

VMware recognized early on that storage is a key factor in the world of virtualization. Unfortunately, many of the innovations that make the VMware products unique in the field of storage connectivity have been slow to be adopted into PowerCLI or are simply missing. This deficit is resolved in version 6; PowerCLI now stands on an equal footing with other management tools.

One of the most important innovations relates to VSAN support and demonstrates the great community influence on PowerCLI, because the code base of the new commands comes from a Fling, an unofficial development by three VMware employees in February 2015 that was published on the VMware Labs website. In addition to the cmdlets required for managing the VSAN resources (*-VsanDisk and *-VsanDiskGroup), some core objects of the vSphere module needed to be updated. For example, Set-Cluster and New-Cluster have two new parameters: -VSANEnabled determines whether VSAN functionality exists in the corresponding cluster, and -VSANDiskClaimMode governs how the existing cluster disks are added to the VSAN. The permissible values are Automatic and Manual. Additionally, Set-VMHostNetworkAdapter and New-VMHostNetworkAdapter now have the new -VsanTrafficEnabled parameter. The properties described above have been added to the cluster object and HostNic object.

As you know, an NFS 4.1 data store in vSphere focuses more sharply on authentication compared with NFS 3, because the new NFS standard uses Kerberos v5 authentication, which can be handed over to the Set-DataStore cmdlet in the form of the -Kerberos parameter. The complete command is

>New-Datastore -Name <display name> -NFS -NFSHost <Name/IP of NAS> -Path <export path> -Kerberos

Cmdlets have also been added to manage the associated user login credentials for each ESXi host, including

>New-NFSUser -VMHost <ESXi-Host> -Username <Name> -Password <password>

or

>New-NFSUser -VMHost <ESXi-Host> -Credential <PSCredential object>
 
>Set-NFSUser -VMHost <ESXi-Host> -NFSUser <NFSUser object> -Password <new password>
>Get-NFSUser -VMHost <ESXi-Host>
 
>Remove-NFSUser -NFSUser <NFSUser object>

VMware introduced the vSphere API for Storage Awareness (VASA) with vCenter 5.0 back in August 2011 but has only now implemented it in PowerCLI. In addition to the VASAStorageArray and VASAProvider object classes, the cmdlets Get-VASAStorageArray (the output can be filtered by LUN, name, or VASAProvider), Get-VASAProvider and New-VASAProvider have been added.

In the latter case, it is possible to pass in a certificate explicitly for the new provider to be added (-Certificate) or tell vSphere to trust the existing certificate permanently (-Force). The required authentication can be passed in as a PSCredential object (-Credential) or explicitly (-UserName and -Password). Finally, there is now Remove-VASAProvider; note that all VASA providers are removed if the implicit -Provider parameter is not specified.

All Get cmdlets described here accept the additional -Refresh parameter, which reads the currently active VASA configuration of the host in question before computing the results. This process can take a while, depending on the complexity of the storage landscape. Without -Refresh, the configuration stored in vCenter is used.

Finally, VMware added four new cmdlets – Get-VAIOFilter, New-VAIOFilter, Set-VAIOFilter, and Remove-VAIOFilter – for its new VAIO storage API (vSphere API for I/O filtering) in PowerCLI 6. VAIO represents a further step toward the VMware software-defined data center.

DRS Up Close

Another new feature of PowerCLI 6 will primarily interest vSphere users who operate extensive DRS (distributed resource scheduler) infrastructures and need to diagnose the behavior of DRS from time to time. The new Get-DrmInfo cmdlet provides "DRM bundles" – a packed collection of DRS logs.

The cmdlet's parameters let you restrict the output to one or more clusters and – what is even more interesting – to a date and time interval, which helps make the search for the unwanted DRS recommendation and the factors that led to it far more efficient. The new cmdlet is the only export from the equally new VMware.VimAutomation.HA module.

Support for Operations Manager

VMware.VimAutomation.vROps is another new PowerCLI module that provides 12 cmdlets for scripting the vRealize Operations Manager. A session always begins with Connect OMServer and ends with Disconnect OMServer. If you only want to interrupt a session and resume it later on, you can read the Session Secret and then re-connect with it.

Within the session, you have access to a variety of monitoring information, such as recommendations, alarms, and their definitions; the resources managed by the Operations Manager; statistical data for the individual metrics; and more.

The only cmdlet that lets you influence the function of the Operations Manager directly is set-OMAlert, however. Currently it has four operations: TakeOwnership, ReleaseOwnership, SuspendMinutes, and Cancel.

Thus, the integration of Operations Manager with existing ITSM (IT Service Management) infrastructures and processes is now also possible with PowerShell. If you want to adjust the configuration of Operations Manager objects, you currently still need to resort to the GUI.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Innovations in PowerShell 5
    Windows 10 brings an updated, fifth release of PowerShell that vastly simplifies the task of managing modules and software packages. The scripting language now also handles various formatted output from commands and selection lists.
  • Windows Server 2012 Administration

    Get Ready: Windows Server 2012, formerly known as Windows Server 8, is on its way.

  • PowerShell Part 1: Retrieving System Information

    Windows administrators, like Unix or Linux administrators, look for ways to perform their duties with ease and elegance through automation. PowerShell allows administrators to gather information, change Registry parameters, work with Active Directory, manipulate services, look at events, work with Windows Management Instrumentation (WMI), and much more. PowerShell is a Windows administrator’s best friend.

  • Working with objects in PowerShell
    This workshop helps admins understand the object-oriented structure of PowerShell.
  • Dealing with VHDX files
    VHDX files introduce some improvements over the legacy virtual hard disk format. In this article, we review some of the interesting features.
comments powered by Disqus