Quantcast
Channel: VMware PowerCLI Blog
Viewing all 146 articles
Browse latest View live

PowerCLI at VMworld Europe 2016

$
0
0

VMworld Europe 2016

VMworld Europe is almost here! There were lots of exciting PowerCLI sessions and events on tap at VMworld US, and we’re planning to bring all that awesomeness over to Barcelona. There may even be a couple new things added to the mix, so you don’t want to miss out.

There’s some great sessions and a group discussion planned, as well as some Hands-On Labs that will be available all week!

Sessions

Thursday, Oct 20, 12:00 PM – 1:00 PM – Kyle Ruddy & Chris Wahl
INF8038 – Getting Started with PowerShell and PowerCLI for Your VMware Environment: VMware’s PowerCLI is one of the most complete, mature, and widely adopted extensions to the framework. It includes a plethora of functions that abstract the vSphere API down to simple and powerful cmdlets for operating your vSphere environment. In this session you’ll learn how modules, snapins, functions, and scripts relate to one another, how to install and configure your PowerShell Integrated Scripting Environment, setup a profile, and begin writing PowerCLI scripts using safe, non-destructive starter code. We’ll also dive into exploring objects, extension data, and perform simple logic statements.

Thursday, Oct 20, 10:30 AM – 11:30 AM – Nicholas Bradford
NET7514 – PowerNSX and PyNSXv: Using PowerShell and Python for Automation and Management of VMware NSX for vSphere: Regardless of whether you are a Windows guru, or dream in awk and sed, there are powerful command-line and scripting tools as well as programing language bindings available to you for managing VMware NSX for vSphere environments. This session will take a light hearted, but informative, look at two tools that enable you to query, manage, manipulate and automate your VMware NSX for vSphere platforms.

Tuesday, Oct 18, 12:30 PM – 1:30 PM – Luc Dekens & Alan Renouf
Wednesday, Oct 19, 3:30 PM – 4:30 PM – Luc Dekens & Alan Renouf
INF8092 – The Power Hour: Deep Dive, DevOps, and New Features of PowerCLI: Alan and Luc will present you with a state of the union for PowerCLI, discussing what’s new, what’s changed, and what it means for you. Be sure to attend for exciting news and tech preview features and demonstrations. With the rise of all things DevOps, this session will also show you the latest state of the community-driven VMware vSphere DSC resources, including why and how to use them, what they are, and what’s in store. This session will be filled with best practices, including fast(er) statistical reports and assigning SCSI IDs and payment card industry slot numbers. Don’t reinvent the wheel, just copy our code!

Tuesday, Oct 18, 2:00 PM – 3:00 PM – Alan Renouf
INF8255 – Evolving the vSphere API for the Modern Era: Get an overview of the current vSphere API, some tips and tricks on how to use it, and also explore some of the different methods and tools that are available to a variety of audiences (vSphere Administrators, Developers, etc) when automating against the vSphere API. If you’re interested in Automation, DevOps, or Development, this is a must attend session.

Group Discussions

Limited seats are available for the Group Discussions, so sign up as early as possible!

Wednesday, Oct 19, 12:30 PM – 1:30 PM – Alan Renouf & Kyle Ruddy
Programmatic Access to vSphere: API/SDK/CLI: Join this discussion to discuss programmatic access to vSphere including API/SDK/CLI, where to get started, how to use them, and where to use them.

Expert Lead Workshop

Wednesday, Oct 19, 10:30 AM to 11:45 AM – Vinith Menon
ELW-1721-SDC-6 – Introduction to VMware PowerCLI: In this Expert-led Workshop, go hands-on with VMware PowerCLI. Gain familiarity with the tool, and then dive deeper into the functionalities available in this exciting product. Both new and experienced users are sure to learn something new.

NOTE: This Expert Lead Workshop is a late add-on to the schedule. Please register via this link: https://www.surveymonkey.com/r/W77FXJY

Hands-On Labs

SPL-1721-SDC-6 – Introduction to VMware PowerCLI: Go hands-on with VMware PowerCLI. Gain familiarity with the tool, and then dive deeper into the functionalities available in this exciting product. Both new and experienced users are sure to learn something new.

SPL-1783-HBD-1 – VMware vCloud Air – Manage Your Cloud: VMware vCloud Air can be managed through multiple solutions depending on your needs and requirements. In this lab we will look at how we can connect to our vCloud Air environment through the vRealize Cloud Management Platform, utilizing the power of vRealize Automation to provision and manage workloads running in vCloud Air. We will also look at how we can use PowerCLI to automate tasks in vCloud Air. Finally, we will show how vRealize Operations can be used to operate and manage our vCloud Air environment.

The post PowerCLI at VMworld Europe 2016 appeared first on VMware PowerCLI Blog.


PowerCLI Core Fling – Available For Download!

$
0
0

I am extremely excited to announce that the PowerCLI Core Fling has been released and is available for download!

Before getting to the download link, let’s cover a couple things first.

This release is based on, and requires, Microsoft PowerShell Core and .NET core. If you do not already have it installed, see the accompanied documentation for a walkthrough on getting started.

Feedback is very much welcomed. Please use the Fling site’s comment section to submit feedback. Keep in mind, we improve the product based off of your feedback, so please do let us know!

Enough suspense, the PowerCLI Core Fling is available here: https://labs.vmware.com/flings/powercli-core

Check out this demo of the install process on a Linux system:

Enjoy, and don’t forget the feedback!

The post PowerCLI Core Fling – Available For Download! appeared first on VMware PowerCLI Blog.

What to Expect in PowerCLI 6.5?

$
0
0

PowerCLI 6.5 was announced last week at VMworld Europe and, while we are waiting for it to be generally available, we thought it would be a good time to give you an idea of what to look forward to in the meantime.

What’s New

VMware, with PowerCLI, was one of the early adopters of PowerShell and in the PowerShell v1.0 days, snap-ins were the only way to extend the shell for additional functionality. With each release of PowerCLI we’ve been progressing the switch over to using modules and with PowerCLI 6.5, it will be 100% module based! Thanks to all the hard work of the PowerCLI Engineering team, the migration is finally complete!

No More Snapins!

Core vSphere Module

The Core vSphere module has received a number of new updates too. The Move-VM cmdlet now supports cross vCenter vMotion. The ability to specify the number of cores for a VM has been added to the New-VM and Set-VM cmdlets. The last of the big updates to the Core module is that the Open-VMConsoleWindow now uses the latest version of the VMware Remote Client (VMRC).

Cross vCenter vMotion

VSAN Cmdlets

The storage module has been a big focus and has some major new updates as well. There are a lot of new VSAN cmdlets being introduced in this release. The ability to get and set VSAN cluster configurations, manage VSAN fault domains, update the HCL database, perform various VSAN tests, and a few other features too!

VSAN Cluster Configuration

VVol Cmdlets

VVols
Continuing on the topic of the storage module, there are also some fantastic new cmdlets added to also work with VVOL replication. We can now retrieve and sync replication groups as well as retrieving and/or starting the replication failover preparation, and even starting the replication failover itself.

Horizon Module

Last, but certainly not least, of the big updates to PowerCLI 6.5 is a complete re-write of the Horizon View module. The module can be ran from anywhere, instead of just on the View Connection server. The module is also installed with the PowerCLI installer. The module will give you access to the Horizon View Public API and there will be some advanced functions available on the PowerCLI Example Scripts GitHub repo upon release.

New Horizon Module

Summary

There’s lots of cool new features and improvements coming in the next release of VMware PowerCLI, and it will be released side by side with vSphere 6.5 later this year. Over the next couple of months there will be several blog posts posted which will highlight many of these new features and how to put them to use in your own environments.

The post What to Expect in PowerCLI 6.5? appeared first on VMware PowerCLI Blog.

New Release: PowerCLI 6.5 R1

$
0
0

There’s been a lot of buzz around PowerCLI lately, and we’re keeping it going! It gives me great pleasure to announce the general availability of VMware PowerCLI 6.5 Release 1!

Before diving in on all the new features, it’s worth noting that these features are all created based on feedback taken directly from the users. Please help us make the product better by letting us know what would make PowerCLI easier to use and what would make your automation tasks less painful! The PowerCLI Product Manager, Development Team and I, would like to extend a huge Thank You to the community for their great feedback and consistent drive to enhance the product.

Cmdlet Updates

The Core vSphere module has received a number of updates as well as stability and performance improvements. The most notable updates include cmdlets based around VM creation and management. The ‘Move-VM’ cmdlet now supports the ability to vMotion VMs between vCenters which is known as Cross vCenter vMotion. Performing a Cross vCenter vMotion with PowerCLI also allows the VM to traverse between separate SSO domains too! This is something not available with the GUI. The ‘New-VM cmdlet now supports configuring a VM to have a specific number of CPU cores. Then, the ‘Open-VMConsoleWindow’ has been updated to provide access to the latest and greatest version of the VMware Remote Console (VMRC). Lastly, various cmdlets have received updated views to allow access to the new vSphere 6.5 APIs!

Storage Module Updates

The PowerCLI Storage module has been a big focus on this release. A lot of functionality has been added around vSAN, VVOLs, and the handling of virtual disks. The vSAN cmdlets have been bolstered to more than a dozen cmdlets which are focused on the entire lifecycle of a vSAN cluster. The entire vSAN cluster creation process can be automated with PowerCLI as well as running tests, updating the HCL database, and much more!

  • Get-VsanClusterConfiguration
  • Get-VsanDisk
  • Get-VsanDiskGroup
  • Get-VsanFaultDomain
  • Get-VsanResyncingComponent
  • Get-VsanSpaceUsage
  • New-VsanDisk
  • New-VsanDiskGroup
  • New-VsanFaultDomain
  • Remove-VsanDisk
  • Remove-VsanDiskGroup
  • Remove-VsanFaultDomain
  • Set-VsanClusterConfiguration
  • Set-VsanFaultDomain
  • Test-VsanClusterHealth
  • Test-VsanNetworkPerformance
  • Test-VsanStoragePerformance
  • Test-VsanVMCreation
  • Update-VsanHclDatabase

vSphere 6.5 introduces a new way to handle the management of virtual disks. Instead of managing a VM’s hard disks through the VM, they can now be managed independently with new PowerCLI cmdlets. This allows the handling of a virtual disk’s lifecycle to be decoupled from the lifecycle of a VM. This adds a ton of flexibility!

  • Copy-VDisk
  • Get-VDisk
  • Move-VDisk
  • New-VDisk
  • Remove-VDisk
  • Set-VDisk

PowerCLI has been updated to include new cmdlets that allow for the automated management of the VVOL replication features which are new to vSphere 6.5. Some of the new features include finding fault domains and replication groups, syncing replication groups, as well as preparing for and starting the failover process to the target site.

  • Get-SpbmFaultDomain
  • Get-SpbmReplicationGroup
  • Get-SpbmReplicationPair
  • Start-SpbmReplicationFailover
  • Start-SpbmReplicationPrepareFailover
  • Sync-SpbmReplicationGroup

Horizon Module

A brand-new module has been included to work with VMware Horizon! This has been a long time coming and has finally been released. The module can be installed anywhere and then remotely connect to the Horizon Connection server, a huge improvement over the last offering. Speaking of improvements, the module provides access to 100% of the public API through the Connect-HVServer and Disconnect-HVServer cmdlets. Keep an eye on the PowerCLI-Examples Github repo for functions allowing you to easily work with this module and provide sample code!

Compatibility

As with all versions of PowerCLI, it’s also backwards compatible going back to vSphere 5.5!

PowerCLI and vSphere Compatibility

The Storage module is compatible with vSAN 6.0 and newer, as well as Site Recovery Manager 6.1 and newer!

PowerCLI and vSAN SRM Compatibility

Last, the Horizon module is compatible with Horizon 7.0.2.

PowerCLI and Horizon Compatibility

PowerCLI Core

As if this release wasn’t enough, PowerCLI Core also has support for the new 6.5 vSphere APIs! This ensures those core vSphere cmdlets and Views are available to other operating systems PowerCLI Core operates on as well!

More Information and Download

For more information on changes made in VMware PowerCLI 6.5 Release 1, including improvements, security enhancements, and deprecated features, see the VMware PowerCLI Change Log. For more information on specific product features, see the VMware PowerCLI 6.5 Release 1 User’s Guide. For more information on specific cmdlets, see the VMware PowerCLI 6.5 Release 1 Cmdlet Reference.

You can find the PowerCLI 6.5 Release 1 download HERE. Get it today!

The post New Release: PowerCLI 6.5 R1 appeared first on VMware PowerCLI Blog.

Saying Farewell to Snapins!

$
0
0

One of the key improvements to the VMware PowerCLI 6.5 R1 release is the absence of PowerShell snapins. All of the remaining snapins have been converted to modules!

Snapin History

If you don’t know why this is such a big deal, let me take a second to cover some history on snapins. Going back to the days of PowerShell version 1, snapins were the only way to extend the shell, or add additional features and functionalities. The issue with snapins begin due to how they can only be written in a .NET programming language and then have to be assembled before being handed off to the user. Then, once the user has them, the issues continue due to the snapins having to be installed and registered to each individual system a user wishes to use them on. Snapins also lack the ability to explicitly define dependencies, this causes issues for a product like PowerCLI which is comprised of several individual components.

PowerShell version 2 introduced modules, which resolved a majority of those issues. Modules can still be written in any .NET programming language, or can even be written in PowerShell itself! Modules are mobile and don’t require any registrations. Once the modules are in hand, they can be referenced automatically by placing them in one of the proper folders or by specifying the directory path to where they reside for each system requiring access.

Finding Snapins

This change in architecture introduces an issue for already created scripts which are trying to load the old VMware snapins. Instead of performing something that looks like:

Add-PSSnapin –Name VM*

We’re recommending a replacement from that command to this command:

Get-Module –ListAvailable VM* | Import-Module

We’re not going to leave the rest to you to handle. There’s some functions which have been added to the PowerCLI Community Repository which will point out which scripts contain that line. There’s also a function which can comment out that line and add the new recommended command. These functions are available within the Update_PowerCLI_Scripts.ps1 script.

The first function is “Get-PowerCLISnapinUse” and will show what scripts (.ps1 extensioned) include the string “Add-PSSnapin*VM*” and will display the file name, line where the string resides, path to the directory, and the full path of the file.

Get-PowerCLISnapinUse Example Output

The second function is “Update-PowerCLISnapinUse” and is based around adding the new Import-Module command and commenting that string out.

Results from using Update-PowerCLISnapinUse

Additionally, if you’ve already updated your version of PowerCLI, you may have noticed the installation directory has changed as well. If you have the “Initialize-PowerCLIEnvironment” script hardcoded into your scripts, there are also some functions to handle that as well. The functions for that are done by way of “Get-PowerCLIInitialization” and “Update-PowerCLIInitialization”. These functions work similarly to the above, however the “Update-PowerCLIInitialization” function just updates the directory path and does not comment anything out.

Conclusion

VMware PowerCLI moving over to be completely modules is a huge accomplishment in this newest release. As always, it’s backwards compatible and we recommend upgrading to the latest version.

You can find the PowerCLI 6.5 Release 1 download HERE.

The post Saying Farewell to Snapins! appeared first on VMware PowerCLI Blog.

Spotlight on the Move-VM Cmdlet including PowerCLI 6.5 Enhancements

$
0
0

VMware PowerCLI 6.5’s release introduced a lot of new cmdlets and improvements to existing cmdlets. One of my favorite improved cmdlets has to be Move-VM. Move-VM was already a very versatile cmdlet before this new release. It could be used to move a VM between hosts, datastores, resource pools, clusters, to new folders, to a vApp, and so forth. Now, with PowerCLI 6.5 R1, Move-VM can move VMs between vCenters! We can even take that a step further, Move-VM can move VMs to vCenters which are not linked together by SSO domain. That’s something that cannot be done by the web client!

Let’s start by taking a look at the newest addition to the cmdlet, migrating VMs between vCenters.

Cross vCenter vMotion

Cross vCenter vMotion was introduced with vSphere 6.0. It’s proved to be a great feature that opens up new options in flexibly managing a vSphere environment. One of the limitations in using cross vCenter vMotion by way of the Web Client is that it can’t migrate VMs between SSO domains. This is where the usage of PowerCLI is hugely beneficial because PowerCLI allows users to fill that gap. The key to PowerCLI being able to overcome that limitation is due to its ability to connect to multiple vCenter servers at the same time.

In order to perform a cross vCenter vMotion, there are a couple parameters that are needed:

  • Active Connection to both Source and Destination vCenters
  • Source vCenter
    • VM
    • VM’s Network Adapter/s
  • Destination vCenter
    • Destination ESXi Host
    • Destination Datastore
    • Destination PortGroup/s

Here’s some example code on how that can be accomplished:

$sourceVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword
$destVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

$vm = Get-VM $vmname -Server $sourceVCConn
$networkAdapter = Get-NetworkAdapter -VM $vm -Server $sourceVCConn

$destination = Get-VMHost -Server $destVCConn
$destinationPortGroup = Get-VDPortgroup -VDSwitch $switchname -Name VM-Network1 -Server $destVCConn
$destinationDatastore = Get-Datastore $datastorename -Server $destVCConn

Move-VM -VM $vm -Destination $destination -NetworkAdapter $networkAdapter -PortGroup $destinationPortGroup -Datastore $destinationDatastore

I also want to filling in a couple informative gaps in the above code:

  • Due to the cross vCenter vMotion functionality being added in as part of vSphere 6.0, it can only be performed against vCenter servers of 6.0 and newer.
  • The destination parameter only accepts an individual ESXi host. A workaround could look like the following code:
    $destination = Get-Cluster –Name Cluster01 –Server $destVCConn | Get-VMHost | Select-Object –First 1
  • The datastore parameter only accepts an individual datastore. A workaround could look like the following code:
    $destinationDatastore = Get-DatastoreCluster –Name DSCluster01 –Server $destVCConn | Get-Datastore | Sort-Object -Property FreeSpaceGB -Descending | Select-Object -First 1

Multiple NIC VM vMotion

If you look at the example code above, specifically at the network pieces, you’ll notice that it only focuses on moving a VM with a single NIC. However, both the NetworkAdapter and PortGroup parameters accept arrays. This means that you can pass multiple objects to those parameters.

One key thing to note is that the first item in each array will be referenced together, then the second items will be referenced together, and so on and so forth. If there are multiple network adapters and only one portgroup specified, the network adapters will all be assigned to the same portgroup. If there is only a single network adapter and multiple portgroups specified, the command will error out.

Here’s an example of doing a Cross vCenter vMotion on a VM that has multiple NICs:
Move-VM with Multiple Network Adapters

Conclusion

The above examples are just the tip of showing just how versatile the Move-VM cmdlet really is. Let us know how you’re using Move-VM in your environment in the comments below!

For more information on its use in your environment, see the PowerCLI cmdlet reference on Move-VM.

The post Spotlight on the Move-VM Cmdlet including PowerCLI 6.5 Enhancements appeared first on VMware PowerCLI Blog.

Welcoming a New Member to the Team

$
0
0

Jeffrey Snover and Jake Robinson

Jake Robinson (right) with PowerShell “father”, Jeffrey Snover (left)

I’d like to welcome someone new to the PowerCLI team: Jake Robinson.

Jake is our new Senior Product Manager for Automation Frameworks and CLIs. This means he’s going to be spending a lot of time focusing on the future of PowerCLI!

Jake has been long been a PowerCLI user. He’s even presented PowerCLI sessions at VMware and PowerShell User Groups as well as vBrownBag.

In his spare time, Jake enjoys brewing beer, playing video games, and grooming his epic beard.

When asked about the future of PowerCLI, Jake said: We are in the Post-GUI era, and PowerCLI has been, and will continue to be, the best user interface for VMware products, not just vSphere!

I think it’s fair to say the future of PowerCLI is bright!

You can find Jake’s personal blog at http://geekafterfive.com/ and contact him on Twitter via @jakerobinson

The post Welcoming a New Member to the Team appeared first on VMware PowerCLI Blog.

Help Shape PowerCLI’s Future – Poll

$
0
0

Community feedback has always played an important role in how PowerCLI has evolved and improved. Whether it’s the desire to convert from snapins to modules, adding additional functionalities to existing cmdlets, or creating brand new cmdlets and modules, the feedback we receive has always been extremely important.

This time we have an ask to help shape the future of PowerCLI’s packaging, installation, and upgrade process in the form of an online poll available here: https://www.surveymonkey.com/r/HGQDJFQ

Giving a little context around the poll, there have been a lot of asks around getting PowerCLI into the PowerShell Gallery. The PowerShell Gallery is an online repository containing an amazing amount of PowerShell modules and scripts. The PowerShell Gallery allows users the ability to search, install, update, and uninstall these resources directly from a PowerShell session.

Taking a look at how we distribute PowerCLI today, this move would have some major impacts. Instead of logging into my.vmware.com then downloading and installing PowerCLI through an MSI, users could simply open PowerShell and run:

Install-Module -Name PowerCLI

Updating would change as well, as users could then run:

Update-Module -Name PowerCLI

With the changes in these installation methods, it would also mean the start menu and desktop shortcuts would no longer be automatically created at time of install.

Last big impact would be to offline installations. Since the PowerShell Gallery is an online repository, users would have to access the gallery using a system that has internet access, running a command that looks something like the following, and then completing the install by copying the module over to the offline system where it can now be imported:

Save-Module -LiteralPath "C:\MyLocalModules\" -Name PowerCLI

The last question is optional and is asking for an email address since we’ll have some goodies available as giveaways!

If you’d like some additional information about the PowerShell Gallery, see the following link: https://msdn.microsoft.com/en-us/powershell/gallery/psgallery/psgallery_gettingstarted

Here’s a link to the survey: https://www.surveymonkey.com/r/HGQDJFQ

Again, thanks to everyone for helping make PowerCLI awesome!

The post Help Shape PowerCLI’s Future – Poll appeared first on VMware PowerCLI Blog.


New Release: PowerCLI 6.5 R1 Poster!

$
0
0

PowerCLI 6.5 was a big release for us. We changed the name to reflect that we’re doing a bit more than just vSphere these days, we fully converted our snap-ins to modules, and so many more upgrades and updates. There are always a lot of asks for it with every release, so I am extremely happy to finally announce the release of the VMware PowerCLI 6.5 R1 poster!

The poster features a bit of a new layout, but still features all of our cmdlets and some associated examples. It also calls out the PowerCLI Community Repository, along with some of what it contains thanks to our amazing community members, and some of the PowerCLI focused flings!

PowerCLI Poster

VMware PowerCLI 6.5 R1 Poster

If you’re looking to print one out, they are best at 39 inches width by 19 inches height.

Also, be on the lookout for these posters coming to a VMworld and/or VMUG near you!

The post New Release: PowerCLI 6.5 R1 Poster! appeared first on VMware PowerCLI Blog.

Getting Started with PowerCLI for Horizon View

$
0
0

PowerCLI 6.5 introduced a brand new, completely re-written, module for Horizon View that is leaps and bounds better than the prior release. As an automation fanatic and former View administrator, PowerCLI’s offering for Horizon View has always been an important part of my toolbox.

Graeme Gordon, a Senior EUC Architect on our EUC Technical Marketing team, has created a terrific video on how to get started using this new module that we recommend checking out.

Watch the Video

Also, here’s a direct link to the blog post Graeme references in the video: Getting Started with PowerCLI 6.5 for Horizon View

The post Getting Started with PowerCLI for Horizon View appeared first on VMware PowerCLI Blog.

New Release: Learning PowerCLI – Second Edition Book

$
0
0

Learning PowerCLI - Second EditionRecently, the new book Learning PowerCLI – Second Edition was published by Packt Publishing. Learning PowerCLI – Second Edition contains 517 pages of PowerCLI goodness. The book starts with downloading and installing PowerCLI. It continues with basic PowerCLI concepts, and working with PowerShell objects. Managing vSphere host, virtual machines, virtual networks, storage, high availability, clusters, and vCenter Server are the following topics. After patching ESXi hosts and upgrading virtual machines using vSphere Update Manager, managing VMware vCloud Director and vCloud Air, using Site Recovery Manager, vRealize Operations Manager, and REST API to manage NSX and vRealize Automation, the book finishes with a chapter about reporting.

If you are new to PowerCLI or have some PowerCLI experience and want to improve your PowerCLI skills, Learning PowerCLI – Second Edition will teach you to use PowerCLI to automate your work!

What’s New

Compared to the first edition, the following new topics are added in Learning PowerCLI – Second Edition:

  • Importing OVF or OVA packages
  • Using Tags
  • Using VMware vSAN
  • Using vSphere storage policy-based management
  • Configuring enhanced vMotion compatibility (EVC) mode
  • Patching ESXi hosts and upgrading virtual machines
  • Managing VMware vCloud Director and vCloud Air
  • Using Site Recovery Manager
  • Using vRealize Operations Manager
  • Using REST API to manage NSX and vRealize Automation

Learning PowerCLI – Second Edition is available exclusively from Packt Publishing: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition

About the Author

Learning PowerCLI – Second Edition is written by Robert van den Nieuwendijk. Robert is a freelance system engineer living and working in the Netherlands. He is a VMware vExpert since 2012 and a moderator of the VMware VMTN Communities. Robert has a blog at http://rvdnieuwendijk.com. You can follow Robert on Twitter as @rvdnieuwendijk.

The post New Release: Learning PowerCLI – Second Edition Book appeared first on VMware PowerCLI Blog.

vSphere API Access Comparison – Lightboard Style

$
0
0

A question keeps coming up more and more often around accessing the vSphere API with PowerCLI. The conversation is normally centered around when to use Get-View versus when referencing an object’s ExtensionData property should be used.

This provided a great opportunity to create a lightboard video to highlight the different methods:

To answer the actual question though, the choice is yours. You get access to the same information available by the vSphere API either way!

The post vSphere API Access Comparison – Lightboard Style appeared first on VMware PowerCLI Blog.

Using PowerCLI for Distributed Switch Management

$
0
0

We’re excited to release another video in the series on PowerCLI tips and tricks! This time we’re covering how to use PowerCLI for distributed switch management.

This video shows how to perform the following tasks easily:

  • Creating a vSphere Distributed Switch
  • Adding Hosts to the Created vSphere Distributed Switch
  • Creating Distributed Port Groups
  • Creating a VMKernel NIC with vMotion Enabled
  • Creating a VMKernel NIC with Fault Tolerance Enabled
  • Backing Up a vSphere Distributed Switch Configuration
  • Restoring a vSphere Distributed Switch Configuration

Watch the Video

Other videos in this series are available below. If you haven’t seen them yet, I highly recommend them. They are all quick, easy to learn and easy to reproduce in your own environment.

The post Using PowerCLI for Distributed Switch Management appeared first on VMware PowerCLI Blog.

Thoughts around PowerCLI and the Powershell Gallery

$
0
0

I am *very* excited to share some thoughts and possibilities for PowerCLI.

Packaging and Installation are big areas we have been looking at. We have heard loud and clear that our customers wanted to embrace modules and in our recent releases we have moved away from snapins into modules. We’re now looking at how we package the modules and deliver them to our users.

One possibility would be releasing PowerCLI exclusively from the Powershell Gallery, the central repository for Powershell modules. The benefits of this would be great, as it provides easy installation and upgrade, follows Powershell patterns for modules, and most importantly would allow us to deliver PowerCLI to multiple platforms, such as Linux and MacOS.

Here is an idea of what we are currently thinking:

  1. You would need to make sure you have the latest Powershell. WMF 5.1 is required for the PowershellGet cmdlets, which includes install-module. (You may want to do this now!)
  2. Make sure $env:PSModulePath includes C:\Program Files\WindowsPowerShell\Modules . This is only precautionary because it should already be set, but you should check anyway.
  3. Prior to installation of the PowerCLI from the Microsoft Gallery you would need to uninstall any previous version of PowerCLI that was installed by MSI.
  4. You would no longer have PowerCLI shortcuts on your desktop. PowerCLI would be immediately available when you run powershell, no Import-Module required. If you really miss the icon, find me at a conference and I’ll give you a sticker! 🙂
  5. Installation of PowerCLI on machines that cannot access the Powershell Gallery can be done by saving the module to a thumb drive or network share accessible to the installation target and dropping the files in the module folder of the destination computer or using Install-Module with a path to the downloaded file.
  6. We are thinking about using Update-Module in the future to make geting the latest bits faster and easier!

I understand that change can be hard, so I’m giving you the opportunity to tell us why (or why not) a Powershell Gallery installation/update would not work for you.

Regarding the results from the survey we recently held, an extremely high percentage of the respondents prefer the Gallery installation for ease of installation and updates. Still, there were a few respondents that had some concerns that I want to address here.

  1. “The Powershell Gallery is not as secure as downloading an MSI from vmware.com” – This is not true. We digitally sign all PowerCLI files as we always have, guaranteeing authenticity. PowershellGet has built-in verification of the digital signature, and will not install unsigned modules unless you explicitly skip the publisher check.
  2. “This makes offline installation/upgrades much harder” – So far, I’ve identified two different methods of offline installation and both require less steps (and ZERO mouse clicks). Method one uses Save-Module to copy to a network drive accessible by the ‘offline’ machine. You could also save to a USB drive or any other storage location that your installation target can access. Method two uses Invoke-WebRequest to download the package and can again be saved to a location of your choosing. Either of these options are still far easier than the current process.

Conclusion

In my prior life as a customer, I could only dream of installation and upgrades being this easy. By releasing to the gallery, it would not only make *that* dream come true, but would also give us the ability to accelerate our releases to get improvements out for you to enjoy much sooner.

Added to this we would be bringing PowerCLI back in line with the PowerShell patterns and ensuring future powershell enhancements made around modules and module tooling could easily be consumed with PowerCLI.

I hope you join with me in the excitement of the amazing opportunities we have with PowerCLI!

What are you excited or concerned about with a Powershell Gallery release? Let us know in the comments here!

 

The post Thoughts around PowerCLI and the Powershell Gallery appeared first on VMware PowerCLI Blog.

New Release: PowerCLI 6.5.1

$
0
0

It’s PowerCLI release day and this is a significant one! This new release of PowerCLI is versioned at 6.5.1 rather than what you probably expected which would be 6.5 R2 (following on from our last release). We have made this change in order to fall in line with the best practices for being used in the PowerShell Gallery!

New Features

First and foremost, the largest update to this version of PowerCLI is regarding how the installation process has changed. As of this release, you no longer have an MSI file to download and install. You can now install PowerCLI directly from the PowerShell Gallery! This update streamlines the install process in multiple ways and allows module based features which PowerShell users will be used to from other PowerShell based additions.

For a detailed walkthrough on this new installation process, please see this blog post on Installing PowerCLI from the PowerShell Gallery.

The modules have also been updated to support the PowerShell auto-loading process. This allows PowerShell to automatically import the necessary modules in order to process the desired entered cmdlet. A good example would be to open a new PowerShell session, enter “Connect-VIServer” and then populate the parameters as you normally would. You’ll be pleasantly surprised to see the cmdlet working properly without any other input for cmdlets required.

PowerCLI cmdlet Autoload Process

The Core module has had some notable updates. We listened to the feedback and have added several new cmdlets that create, manage, and remove DRS cluster groups and VM/Host rules. The new cmdlets are as follows:

  • Get-DRSClusterGroup
  • New-DRSClusterGroup
  • Set-DRSClusterGroup
  • Remove-DRSClusterGroup
  • Get-DRSVMHostRule
  • New-DRSVMHostRule
  • Set-DRSVMHostRule
  • Remove-DRSVMHostRule

One other major change has happened to the main vSphere module (vim.automation.core module) concerning the Site Recovery Manager (SRM) cmdlets. The SRM cmdlets have been removed from the Core module and a new SRM module has been created. The new module is named VMware.VimAutomation.Srm and features updated cmdlets that enable users to interact with the API views for the SRM 6.5 API!

Speaking of APIs, there are a couple other modules which have been updated to work with the most current APIs. The vR Ops module has been updated to work with the views for the vR Ops 6.5 API. The Horizon module has also been updated to work with the views for the Horizon View 7.1 API. The Storage module has also been updated to work with the views for the latest vSAN 6.6 API.

Last, but certainly not least, the Storage module has received some tremendous updates as well. Many new cmdlets have been added to interact with vSAN’s iSCSI features. The cmdlets include managing an iSCSI initiator group and/or an iSCSI target, managing a resource’s access which are not part of the vSAN cluster, and controlling a vSAN sourced iSCSI LUN. The new cmdlets are as follows:

  • Get-VsanIscsiInitiatorGroup
  • New-VsanIscsiInitiatorGroup
  • Set-VsanIscsiInitiatorGroup
  • Remove-VsanIscsiInitiatorGroup
  • Get-VsanIscsiTarget
  • New-VsanIscsiTarget
  • Set-VsanIscsiTarget
  • Remove-VsanIscsiTarget
  • Get-VsanIscsiInitiatorGroupTargetAssociation
  • New-VsanIscsiInitiatorGroupTargetAssociation
  • Remove-VsanIscsiInitiatorGroupTargetAssociation
  • Get-VsanIscsiLun
  • New-VsanIscsiLun
  • Set-VsanIscsiLun
  • Remove-VsanIscsiLun
  • Get-VsanStat
  • Start-VsanDiskFormatUpdate
  • Get-VSANView

The Storage module has received some updates that are not vSAN related as well. The other changes are around storage policy based management (SPBM) cmdlets. These cmdlets are:

  • Start-SpbmReplicationPromote
  • Start-SpbmReplicationTestFailover
  • Stop-SpbmReplicationTestFailover

Summary

As evidenced above, PowerCLI 6.5.1 is a pretty big release. PowerCLI being available exclusively through the PowerShell Gallery allows for a streamlined process of installing PowerCLI. There have been new cmdlets added to handle the management of DRS clusters. Several modules have been updated to interact with views for the newest APIs on SRM, vR Ops, Horizon View, and vSAN. The storage module has had quite a few improvements made around the vSAN iSCSI capabilities as well as SPBM.

For more information on changes made in VMware PowerCLI 6.5.1, including improvements, security enhancements, and deprecated features, see the VMware PowerCLI Change Log. For more information on specific product features, see the VMware PowerCLI 6.5.1 User’s Guide. For more information on specific cmdlets, see the VMware PowerCLI 6.5.1 Cmdlet Reference.

The post New Release: PowerCLI 6.5.1 appeared first on VMware PowerCLI Blog.


Welcome PowerCLI to the PowerShell Gallery – Install Process Updates

$
0
0

PowerCLI 6.5.1 has been released and in this release we have made some big changes to the way you install and keep up to date with PowerCLI! This update was all based around Microsoft PowerShell deployment models, listening to you, the customer and ensuring we are making the changes to provide the best PowerShell product going forward.

As of PowerCLI 6.5.1, you no longer have a MSI file to download and install. You can now install directly from the PowerShell Gallery! This update streamlines the install process in multiple ways and allows module based features which PowerShell users will be used to from other PowerShell based additions.

What does this mean for you?

PowerCLI being on the PowerShell Gallery means there are some changes that users should be aware of. The first big change, there is no more MSI to perform the install and therefore you don’t download it from the VMware website!

The install is done completely through PowerShell itself using the PowerShell Gallery via PowerShellGet. This means also means the other items which used to be installed by way of the MSI won’t be installed automatically. These things include the PowerCLI desktop shortcuts and the User Guide.

There are two ways in which you may install PowerCLI with this new method, online and offline. Let’s take a look at how to perform these methods.

Getting Started

The first step in moving to this new release is to uninstall any prior versions of PowerCLI which may be installed on the system by the old MSI installer, this is needed to move to the new distribution model.

Uninstalling Prior PowerCLI Versions

It is also worth checking to ensure the “PowerCLI” folder has been removed from the following directory: C:\Program Files (x86)\VMware\Infrastructure\

With the prior version of PowerCLI uninstalled, it’s time for the install!

Online Installation From a Computer with an Internet Connection

For the online install, start by confirming access to PowerShell Gallery and being able to find the PowerCLI module. This can be done by running the following:

Find-Module -Name VMware.PowerCLI

Find-Module Output for PowerCLI

Note: If you have not accessed the PowerShell Gallery before, or perhaps have an out of date version of NuGet, you may receive a message indicating there is a missing or out-of-date NuGet provider. NuGet is a Package Management provider. These are primarily used to install, upgrade, configure, and/or remove software in an automated fashion. To accept the installation of a proper version of NuGet, hit “Y”.

We will now make use of the Install-Module cmdlet to make PowerCLI actually available on the local system. This can be done with the following:

Install-Module -Name VMware.PowerCLI –Scope CurrentUser

You will notice we’re only installing it for the current user, we do this because it doesn’t require admin access! If you would like it available for all users of the computer, your PowerShell session will have to be running as an administrator, and PowerCLI will automatically be installed for all users by changing the Scope parameter to AllUsers.

Install-Module usage

Success! We now have the PowerCLI modules installed and available locally!

Offline Install of PowerCLI to a Computer Without an Internet Connection

The following method should be used to install PowerCLI through the PowerShell gallery for those systems which do not have access to the internet. You will need at least one system that has internet access and a way to move the files to the target computer.

While on a system that has internet access, we will find the PowerCLI module with the same command we ran above:

Find-Module -Name VMware.PowerCLI

Then we can download the module for offline consumption with the following command:

Save-Module -Name VMware.PowerCLI -Path C:\Path\To\Desired\Folder

Save-Module Output

At this point, we’ll want to copy those downloaded folders and place them on the system without internet access in a location where PowerShell can find them, this is the modules folder and can be confirmed by typing $ENV:PSModulePath at the powershell prompt.

Local User: $home\Documents\WindowsPowerShell\Modules
All Users: $pshome\Modules

Using PowerCLI

One of the great enhancements in PowerCLI 6.5.1 means we no longer need to load the modules into the PowerShell session as we may have done in the past, as soon as the modules are loaded into the module folder PowerShell will automatically be aware of their existence and you will find the cmdlets registered with the PowerShell session. Normal PowerShell behaviour meanst that as soon as you use the first cmdlet the PowerCLI module will be loaded as needed.

But what about the nice PowerCLI Welcome message and other functions which existed to make PowerCLI easier to use when we launched the old desktop icon?

First, we can mimic the desktop shortcuts by simply running:

Import-Module VMware.PowerCLI

Import-Module VMware.PowerCLI Output

Please note the warning message about joining the Customer Experience Improvement Program (CEIP). We recommend enabling CEIP, as it’s greatly helps us improve our products! In order for the message to not appear, you either have to enable or disable CEIP by way of the Set-PowerCLIConfiguration cmdlet.

The other option to load the cmdlets, simply use the cmdlets as you normally would. The modules will auto-populate as necessary!

Here’s an example of using a new PowerShell session and connecting to a vCenter Server:

PowerCLI Autoloading Example

We can see the session begins without any PowerCLI modules being imported. After typing in the Connect-VIServer cmdlet (tab complete is fully operational as well), we can see the VMware.VimAutomation.Core module has been imported automatically! The other modules won’t be imported until they’re referenced.

Re-Creating The Desktop Shortcut

I know there are quite a few fans of the Desktop shortcut, so I’ll briefly describe how to set that up. First, create a shortcut that points to the PowerShell executable and place it on the desktop. Next, right click the newly created desktop shortcut and select properties. You should find yourself on the “Shortcut” tab. Enter the following values:

Target: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noe -c "Import-Module VMware.PowerCLI"
Start In: C:\
Shortcut Key: None
Run: Normal Window
Comment: Launch VMware PowerCLI

In the end, we should have something quite similar to the following:
Recreating the PowerCLI Desktop Shortcut

Summary

This new install method is a very exciting improvement for PowerCLI. As seen above, this definitely streamlines the process of getting PowerCLI installed and accessible!

To find out more about the other fantastic improvements that are available with VMware PowerCLI 6.5.1, please see the following blog: New Release – PowerCLI 6.5.1

The post Welcome PowerCLI to the PowerShell Gallery – Install Process Updates appeared first on VMware PowerCLI Blog.

PowerCLI 6.5.1 Installation Walkthrough

$
0
0

We released PowerCLI 6.5.1 two weeks ago and the response has been incredible! The VMware.PowerCLI module is closing in on 4,000 downloads from the PowerShell Gallery and we’ve received a ton of good feedback.

There seems to be quite a few questions and comments over this new installation method so I created a walkthrough video to illustrate the process for PowerShell version 5.0 as well as for versions 3.0 and 4.0. We’ve also collected the most common errors and issues during the installation process and included troubleshooting steps for those below.

Walkthrough Video

Common Troubleshooting Steps

If there happens to be an issue during the installation process, here’s a couple of the top tips we have seen on working around them:

  • The process cannot access the file ‘C:\Users\…\AppData\Local\Temp\…’
    • Ensure previous versions of PowerCLI are uninstalled and all PowerShell sessions are closed.
    • Verify the file isn’t being blocked by an antivirus software.
  • A command with name ‘verb-noun’ is already available on this system.
    • This is due to a module already available on the system containing that cmdlet. The more common example modules include FailoverClusters and HyperV.
    • Append “-AllowClobber” to the Install-Module command line.
      Example: Install-Module –Name VMware.PowerCLI –Scope CurrentUser –AllowClobber
  • No match was found for the specified search criteria and module name ‘VMware.PowerCLI’
    • This could be due to a lack of connectivity to the PowerShell Gallery.
    • If a proxy can be used, the “Install-Module” cmdlet can configure proxy connectivity with the “Proxy” and “ProxyCredential” parameters.
      Example: Install-Module –Name VMware.PowerCLI –Scope CurrentUser –Proxy ‘http://my.proxy.company.com’
  • Could not get response from query ‘https://www.powershellgallery.com/api/v2/package/VMware.VimAutomation.Core/…’
    • This warning is just indicating there is an issue establishing connectivity to the PowerShell Gallery. Retry the installation at a later point in time and it should succeed.

Summary

We are really excited about this release and what this means for the future of PowerCLI! Upgrade to PowerCLI 6.5.1 today, and keep that feedback rolling in!

The post PowerCLI 6.5.1 Installation Walkthrough appeared first on VMware PowerCLI Blog.

Spotlight on the New DRS Groups and VM-Host Rule Cmdlets!

$
0
0

We’re kicking off the first in a series of blog posts taking an in-depth look at some of the new cmdlets that were made available with the PowerCLI 6.5.1 release. This first post is going to be covering the cmdlets targeted at managing DRS groups and their associated rules.

These new cmdlets are as follows:

  • Get-DrsClusterGroup
  • New-DrsClusterGroup
  • Set-DrsClusterGroup
  • Remove-DrsClusterGroup
  • Get-DrsVMHostRule
  • New-DrsVMHostRule
  • Set-DrsVMHostRule
  • Remove-DrsVMHostRule

If you’ve never used DRS groups and DRS affinity rules or don’t know what they are, these are a way to control which VMs are able to exist on which hosts. This control is leveraged through either affinity or anti-affinity rules that are configured at the cluster level. These rules are configured between groupings of VMs and groupings of hosts. These rules also have types, which basically describes how the enforcement should work. The types are: Must Run On, Should Run On, Must Not Run On, Should Not Run On

Please see the documentation for more information about: DRS Affinity Rules

Taking A Closer Look – A Use Case Demonstration

We have been given a lab environment and our end result is to have the even numbered App VMs run on the even numbered hosts whenever possible, and likewise with the odd numbered VMs and hosts.

First, a look at the lab environment:

  • 1 Cluster
  • 4 Hosts
  • 50 VMs

Environment Setup

We’ll start by taking a look at the DRS Cluster Group cmdlets. These are used in order to create, manage, and remove VM and host based DRS groups. These cluster groups are then referenced by the DRS VM-Host affinity rules, which we’ll discuss in a bit.

Let’s create the first host DRS group, which will be for the odd numbered hosts. This can be done with the ‘New-DrsClusterGroup’ cmdlet while specifying a name, the cluster, and the desired hosts. A command for our sample environment looks like this:

New-DrsClusterGroup -Name HostsOdd -Cluster Demo -VMHost esx01.corp.local,esx03.corp.local

Creating a DRS group

We’ll repeat a similar process for the even hosts, only this time we’ll store the cluster and desired hosts in their own variables:
Creating a DRS group

We now have the required host DRS groups, so we can move forward and create the VM DRS groups. These are created with the same ‘New-DrsClusterGroup’ cmdlet, except we’ll now use the VM parameter and specify the VMs for each group.

Starting again with our odd numbered VMs, we’ll use the following command:

New-DrsClusterGroup -Name VMsOdd -Cluster $cluster -VM app01,app03,app05

Creating a DRS group

If you’ll notice, that’s nowhere close to all of the necessary odd numbered VMs. We’ll now make use of the ‘Set-DrsClusterGroup’ cmdlet to add the remaining VMs (which I’ve already stored into a variable). This cmdlet also requires usage of either the ‘Add’ or ‘Remove’ parameter in order to specify what kind of modification is being requested.

The command to add the remaining odd system should be similar to the following:

Set-DrsClusterGroup -DrsClusterGroup VMsOdd -VM $VMsOdd –Add

Updating a DRS group

We’ll repeat a similar process for the even VMs’ DRS group:
Creating a DRS group

Before moving on to creating the VM-Host affinity rules, let’s review the DRS groups we’ve created to this point with the ‘Get-DrsClusterGroup’ cmdlet.
Displaying the DRS Groups

This cmdlet also has a couple parameters to help gain additional information. The ‘Type’ parameter can be used to specify whether to return VM groups or host groups. The ‘VM’ and ‘VMHost’ parameters can be used to only return DRS groups belonging to that VM or host.

Some examples of these parameters in use:
Filtering the list of DRS groups

Moving on to the creation of the rules… We’ll be using the ‘New-DrsVMHostRule’ cmdlet along with several parameters. These parameters will be ‘Name’, ‘Cluster’, ‘VMGroup’, ‘VMHostGroup’, and ‘Type’. Most of those should be self-explanatory, but ‘Type’ may not be. Thanks to tab complete, we’ll see that the type options are ‘MustRunOn’, ‘ShouldRunOn’, ‘MustNotRunOn’, and ‘ShouldNotRunOn’ and apply to how the rule is enforced against the cluster.

Remembering that our goal is to have the even VMs run on the even hosts whenever possible, we’ll issue the following command:

New-DrsVMHostRule -Name 'EvenVMsToEvenHosts' -Cluster $cluster -VMGroup VMsEven -VMHostGroup HostsEven -Type ShouldRunOn

Creating a VM-Host Rule

We’ll do a similar command for the odd rule:
Creating a VM-Host Rule

Our objective should be complete and we can verify that by using the ‘Get-DrsVMHostRule’ cmdlet. The output should be similar to the following:
Displaying VM-Host Rules

These VM-Host rules can also be modified once they’ve created with the ‘Set-DrsVMHostRule’ cmdlet. This cmdlet has the ability to rename the rule, enable or disable it, and modify either the VMGroup and/or the VMHostGroup.

The rules can easily be disabled using the following command:

Get-DrsVMHostRule | Set-DrsVMHostRule -Enabled $false

Modifying VM Host Rules

This environment happens to be a lab, so before wrapping up this post we should probably clean it up. We can do this while utilizing the ‘Remove-DrsClusterGroup’ and ‘Remove-DrsVMHostRule’ cmdlets. The commands could look like the following:

Remove-DrsVMHostRule -Rule EvenVMsToEvenHosts,OddVMsToOddHosts
Get-DrsClusterGroup | Remove-DrsClusterGroup

Cleaning up the lab environment

Summary

These eight new cmdlets are a terrific addition to the PowerCLI 6.5.1 release. They are also a great compliment to the already existing DRS cmdlets! Start using them today and let us know your feedback!

The post Spotlight on the New DRS Groups and VM-Host Rule Cmdlets! appeared first on VMware PowerCLI Blog.

PowerCLI at VMworld US 2017

$
0
0

VMworld 2017

It’s that time of year again, VMworld US time! There is a whole slew of PowerCLI and automation based sessions and events going on this year that you should be excited for. Hopefully you are already registered and have started adding these sessions to your schedule. If you haven’t, the countdown has begun and this year is not one to be missed!

The following is going to break down the breakout sessions, group discussions, vBrownbag Community sessions, hands-on labs, and a very special event returning for its second year!

Breakout Sessions

Monday, Aug 28, 11:30 a.m. – 12:30 p.m. – Ariel Sanchez & Edgar Sanchez
SER2077BU – Achieve Maximum vSphere Stability with PowerCLI Assisted Documentation: From Buildout to Daily Administration: vSphere is the core product on which all other VMware technologies depend on. Adhering to the HCI, whether inbox or partner async, defining, documenting and verifying host and vCenter settings are critical for vSphere stability. In this session, we will talk about the experience and lessons learned of managing enterprise environments in a multi-vendor ecosystem, controlling settings drift when scaled to hundreds of hosts using PowerCLI, and producing relevant documentation that could not be produced otherwise.

Tuesday, Aug 29, 11:30 a.m. – 12:30 p.m. – Ragavendra Kumar & Devaraj Ramanjaneya
SER2972BU – Troubleshooting 101 for vSphere 6.x: Join us for an overview of 1) understanding the methodology of problem solving 2) recognizing the powerful troubleshooting tools available in VMware vCenter Server & ESXi server and 3) explore log files that help to diagnose and solve problems. We will also focus on how to make your day to day life easier by using vRealize Log Insight and bring automation using vSphere CLI and PowerCLI in your environment.

Tuesday, Aug 29, 5:30 p.m. – 6:30 p.m. – Dale Coghlan & Nicholas Bradford
NET2119BU – PowerNSX – Bringing the power of PowerCLI to VMware NSX for vSphere: PowerNSX is a PowerShell module that abstracts the VMware NSX for vSphere API to a set of easily used PowerShell functions. Working seamlessly with VMware PowerCLI, PowerNSX brings unprecedented power and flexibility to administrators of VMware NSX for vSphere environments. In this session, you will learn what PowerNSX is and the flexibility and control that it can bring.

Wednesday, Aug 30, 11:30 a.m. – 12:30 p.m. – Kyle Ruddy & Jake Robinson
SER2480BU – VMware PowerCLI 101: Becoming Your Organization’s Superhero: Automate any task in your VMware datacenter with PowerCLI: Kyle and Jake will demonstrate the “power” in VMware PowerCLI, taking you on the journey to make VMware datacenter management fun and efficient. You’ll learn how to craft information-packed reports of your datacenter, automate some of the most daunting GUI tasks, and connect with a community of thousands of PowerCLI users.

Wednesday, Aug 30, 2:30 p.m. – 3:30 p.m. – Luc Dekens & Alan Renouf
SER1875BU – The Power Hour: VMware PowerCLI 10th Birthday Edition: In this special edition of the Power Hour, marking the 10th birthday of VMware PowerCLI, Alan and Luc will not only bring you new features and deep dives but also show how far VMware PowerCLI has come and how it has evolved over the past 10 years. The deep dives will extend far beyond vSphere administration. The examples will demonstrate how to manage your VMware products with VMware PowerCLI in a consistent and user-friendly way.

Wednesday, Aug 30, 4:00 p.m. – 5:00 p.m. – Alan Renouf & Jake Robinson
SER2529BU – VMware PowerCLI What’s New: The Next Evolutionary Leap Is Now: Get the latest scoop on PowerCLI features and capabilities with Alan and Jake! Learn about the latest improvements of PowerCLI Installation and Upgrade using the PowerShell Gallery. We’re always adding new cmdlets to PowerCLI, and the latest release does not disappoint. We’ll share the breadth of everything new you can do with PowerCLI including added vCenter functionality, vSAN functionality and more. If all this wasn’t enough, we’ll also give an overview of multi-platform support and a technical preview of upcoming features.

Thursday, Aug 31, 1:30 p.m. – 2:30 p.m. – Scott Driver & Kyle Ruddy
SER2614BU – PowerCLI 201: Getting More Out of VMware PowerCLI: Join us as we walk attendees through this demonstration heavy session and show how to make your code run faster, how to access the vSphere APIs for better control within the code, and utilize the features of the framework to script even the most daunting of tasks.

Group Discussions

Tuesday, Aug 29, 1:00 p.m. – 2:00 p.m. – Kyle Ruddy & Jake Robinson
SER3041GU – VMware PowerCLI: Join this discussion to learn about and discuss PowerCLI with Product Management, Technical Marketing, and peers!

Wednesday, Aug 30, 10:00 a.m. – 11:00 a.m. – Kyle Ruddy & Jase McCarty
STO1119GU – Automating vSAN Deployments at Any Scale: Join us to discuss some of the mechanisms and workflow requirements when deploying VMware vSAN in small or large deployments.

VMTN vBrownbag Community Sessions

Monday, Aug 28, 1:00 p.m. – 1:15 p.m. – Scott Driver
VMTN6601U – No Money, No Problem – Start Automating with PowerCLI: Do you build or do you buy? It’s a classic IT question, but for many, it comes down to budget. If you don’t have a budget, and all of the Open Source DevOps tools have you scratching your head, no worries! We will discuss some real-world approaches and actual operational examples that will help you get started on automating the management of your virtual machine and virtual infrastructure environments by harnessing the vast potential of PowerCLI.

Wednesday, Aug 30, 9:30 a.m. – 10:00 a.m. – Ariel Sanchez & Edgar Sanchez
VMTN6692U – Estabilidad en vSphere con FOSS/PowerCLI: This is the Spanish, version of the VMworld accepted talk “SER2077BU – Achieve Maximum vSphere Stability with PowerCLI Assisted Documentation: From Buildout to Daily Administration” with the same presenters doing the same content but in spanish!

Monday, Aug 28, 3:00 p.m. – 3:15 p.m. – Russell Hamker
VMTN6637U – Linked Clones with PowerCLI: Talk about the power of Linked Clones with PowerCLI. I will talk about the use cases that my company uses it for and for a few other use cases. This includes accelerating DevOps, spinning up Desktop VMs for uses when needed, and using Linked Clones to duplicate SQL servers for testing.

Tuesday, Aug 29, 11:30 a.m. – 11:45 a.m. – Justin Sider
VMTN6618U – PowerCLI administration with a Windows Docker Image: As a Windows administrator I continue to find ways to help improve my daily life as a PowerShell and VMware PowerCLI techie. One of the problems I consistently fight is my local machine configuration and managing the versions of my installed software. I recently transitioned to using a Windows Docker image to use as my runtime script execution environment. It allows me to customize multiple environments, CLEAN environments, quick deployment, great for remote sites, and its native Windows with full PowerShell.

Wednesday, Aug 30, 10:45 a.m. – 11:00 a.m. – Anthony Hook
VMTN6684U – Discover PowerCLI Without Documentation: Discover how to use PowerCLI and grab information based on a few simple commands. Learn how to figure out what kind of data is returned, and how to find what is available to you.

Wednesday, Aug 30, 11:45 a.m. – 12:00 p.m. – Brian Bunke
VMTN6639U – Vester: vSphere Config Management with PowerCLI: Did your predecessors and coworkers leave all of your clusters/hosts/VMs/etc. with uniform settings? No? Vester uses PowerCLI to report on differences, optionally fix them, and store your desired settings in a config file for future reference.

Wednesday, Aug 30, 1:30 p.m. – 1:45 p.m. – Jorge Torres
VMTN6634U – Como empezar con PowerShell/PowerCLI: Spanish Session – Join me to learn how to initiate and some first steps when learning PowerShell/PowerCLI. I’d like to encourage others to jump into the PowerCLI world and realize its great value.

Thursday, Aug 31, 11:45 a.m. – 12:00 p.m. – Justin Sider
VMTN6632U – XesterUI – A User Interface for Vester vSphere configuration validation: XesterUI is a simplistic web interface that completely wraps Vester. Simple to deploy and configure, this tool can be shared amongst a team or group of system administrators, preventing everyone from needing to install and run command line tests. I’ll walk through a basic scenario of how quick and easy this tool can resolve configuration drift on a vCenter implementation.

TAM Customer Central

Tuesday, Aug 29, 11:30 a.m. – 11:45 a.m. – Kyle Ruddy & Pamela Norris
TAM4528U – Get Started Automating Your Horizon Environment with PowerCLI: Come one, come all, and see how PowerCLI 6.5.1 provides Horizon administrators with the ability to automate their Horizon 7 environments. During this session packed full of interactive demos, you will see how the latest features and functionality can help automate daily tasks with some simple and reproducible commands. With the promise of some great conversations to be had!

Meet The Expert Sessions

Ever wanted to have a chance to sit down with your favorite automation guru? VMworld US is going to give you that chance! Make sure to block out time to sit down with our experts!

Host Session Scheduled Time Table
William Lam MTE4724-SER Monday, Aug 28, 2:15 p.m. to 3:00 p.m. Table 4
Wednesday, Aug 30, 11:15 a.m. to 12:00p.m.
Alan Renouf MTE4723-SER Tuesday, Aug 29, 1:15 p.m. to 2:00 p.m. Table 4
Wednesday, Aug 30, 1:15 p.m. to 2:00p.m.
Thursday, Aug 31, 1:45 p.m. to 2:30p.m.
Kyle Ruddy MTE4722-SER Monday, Aug 28, 5:15 p.m. to 6:00 p.m. Table 4
MTE4721-SER Tuesday, Aug 29, 2:15 p.m. to 3:00p.m.
Wednesday, Aug 30, 2:15 p.m. to 3:00p.m.
Thursday, Aug 31, 11:45 a.m. to 12:30p.m.

Hands-On Lab

SPL181105U – vSphere Automation: Get hands-on with VMware PowerCLI: Gain familiarity with the tool, and then dive deeper into the functionality available with real world examples. Both new and experienced users are sure to learn something new about automating their environments.

Hands-On Lab – Expert Led Workshop

Thursday, Aug 31, 1:30 p.m. – 3:00 p.m. – Kevin Steil
ELW181105U – vSphere Automation – PowerCLI Workshop: In this expert led workshop, get hands-on with VMware PowerCLI. Gain familiarity with the tool, and then dive deeper into the functionality available with real world examples. Both new and experienced users are sure to learn something new about automating their environments.

VMware Code Hackathon

Monday, Aug 28, 8:00 p.m. – 12:00 p.m. – VMware Code
VMTN6722U – Hackathon Event

The VMware Code Hackathon was probably my favorite event from VMworld last year. This event encouraged any VMworld attendee to come, join a team, and complete some form of project or challenge. Attendees varied from vSphere beginners to highly skilled programmers. Everyone had a blast, there were some terrific giveaways, special guests, and so forth.

This year, the Hackathon returns and it is only getting better! I can’t reveal any of the secrets planned, but it is certainly going to be one of the best evening events that week!

Additional Information: VMware Code Blog – VMworld Hackathon is Back

The post PowerCLI at VMworld US 2017 appeared first on VMware PowerCLI Blog.

New Release: VMware PowerCLI 6.5.2

$
0
0

The past couple releases have introduced some new and exciting modernizations for PowerCLI. We’ve moved from Snapins to Modules, leaving behind registry settings and the need for an installer and making packaging much easier. We then introduced you to PowerCLI installation through the Microsoft PowerShell Gallery, making installation and updates a single command.

All of these lead up to us delivering more frequent releases and more timely features and bugfixes. Only three months ago, we introduced PowerCLI 6.5.1, and today we’re delivering 6.5.2, cutting our release time in half from the past. We still have a lot of work to do on our processes, but we look forward to delivering frequent, high quality releases of the best automation library for VMware!

PowerCLI 6.5.2 has some great improvements. They come in three main areas:

  • Addition of the ‘InventoryLocation’ parameter to the following cmdlets: Move-VM, Import-VApp, New-VApp
  • Ability to mount a Content Library sourced ISO with the New-CDDrive cmdlet
  • Updated Support Around Experimental Features

Let’s take a closer look at each of these.

New Parameter: InventoryLocation

The main purpose of the ‘InventoryLocation’ parameter is to specify a folder the VM or vApp should be placed during their related actions. The expected input for this parameter is a type of ‘FolderContainer’. Previously, the only option was ‘Destination’ and it accepted a folder, ESXi host, cluster, or resource pool. The issue was only one item could be specified at a time. Therefore, this addition is nice because it reduces the total number of steps needed to either move a VM between vCenter Servers or when deploying a new VM/vApp.

First example, moving a VM between vCenter Servers. By default, the VM would be moved to the root of the Datacenter in the ‘VMs and Templates’ view. Technically, it would be moved to the ‘vm’ folder but that’s hidden from the GUI view. This new parameter allows us to skip the follow-up ‘Move-VM’ command and place the VM in the proper folder at time of the migration.

Cross vCenter vMotion Example using Inventory Location Parameter

Second example, creating a new VM by importing a vApp. As with the previous example, this cuts down the steps in deploying this VM and streamlines the process.

Import-VApp example while using the Inventory Location parameter

Using Content Library Sourced ISOs

The ‘New-CDDrive’ cmdlet has a new parameter by the name of ‘ContentLibraryIso’. This allows us to mount an ISO which has been presented through vSphere’s Content Library. Here’s an example:

Example usage of the New-CDDrive cmdlet and Content Library ISOs

vSphere’s Content Library is a great resource and I’m really happy to be able to take better advantage of it through PowerCLI!

Experimental Feature Updates

If you’ve had the chance to read through our documentation, perhaps you’ve noticed a couple of the features or parameters which were marked as experimental. Several of these have been tested and we have been able to remove the functionality’s ‘experimental’ messaging.

Some Examples:

  • Set-HardDisk -ZeroOut: This parameter can be used to zero out a disk when the PowerCLI session is connected directly to the ESXi host.
  • New-HardDisk -AdvancedSetting: The experimental part of this parameter was centered around the Storage Distributed Resource Scheduler (SDRS) rule association.
  • New-VM -AdvancedSetting: The experimental part of this parameter was centered around the SDRS (SDRS) rule association.
  • Install-VMHostPatch: The whole cmdlet was experimental and has been approved for supported usage.

Summary

PowerCLI 6.5.2 is the first of our change to having more frequent releases. While these iterative releases may not be as packed full of new features as all the prior releases, we are able to provide new functionality and resolve any issues faster than prior versions. Some proof of that is the addition of the ‘InventoryLocation’ parameter to several cmdlets, the ‘ContentLibraryIso’ parameter to the New-CDDrive cmdlet, and taking several features and cmdlets from experimental to supported!

Don’t wait, Update-Module today!

Update Module Example

For information on the Microsoft PowerShell Gallery update process, see the following blog: Update PowerCLI From the PowerShell Gallery

For more information on changes made in VMware PowerCLI 6.5.2, including improvements, security enhancements, and deprecated features, see the VMware PowerCLI Change Log. For more information on specific cmdlets, see the VMware PowerCLI 6.5.2 Cmdlet Reference.

The post New Release: VMware PowerCLI 6.5.2 appeared first on VMware PowerCLI Blog.

Viewing all 146 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>