Home > Blogs > VMware PowerCLI Blog

Saying Farewell to Snapins!

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.

New Release: PowerCLI 6.5 R1

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!

What to Expect in PowerCLI 6.5?

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.

PowerCLI Core Fling – Available For Download!

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!

PowerCLI at VMworld Europe 2016

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.

PowerCLI Core Coming to a Fling Near You!

One of my favorite announcements at VMworld happened to be about PowerCLI, of course! The big announcement was about its future availability on multiple platforms, including Linux and Mac OS X. This functionality has been one of the biggest requests the PowerCLI team has received over the years and it is extremely exciting that it’s finally coming!

The announcement actually happened during Alan Renouf and Luc Dekens’ session INF8092 titled: The Power Hour: Deep Dive, DevOps, and New Features of PowerCLI. The response in the room was amazing. Then, when Alan asked who would be planning on running PowerShell and PowerCLI on Linux and/or Mac OS, the amount of hands that went up was staggering. In fact, it was so staggering that Alan had to take a picture:
INF8092

I would be remiss if I didn’t mention how this was all made possible by our friends at Microsoft. This past August, Microsoft actually open sourced PowerShell which in turn opened the ability for PowerCLI to be run on multiple platforms.

VMware, and PowerCLI in particular, were involved as special guests when Microsoft made the open source announcement. If you haven’t checked out the announcement video, it’s worth a watch. Pay particular attention around the 46-minute mark:

At this point, you’re probably looking for more details. PowerCLI Core, the multi-platform version of PowerCLI, will be released as a VMware Fling. However, it has not been made available as of yet. The PowerCLI Engineering team is, and has been, working extremely hard on preparing the release.

I’ve had a chance to play with an early version, and it’s amazing. They’ve done an excellent job and it really is just that cool. It still puts a smile on my face every time I do this:
PowerShell on OSX

In the meantime, here is a video showcasing the upcoming Fling:

If you want to watch Alan and Luc’s session INF8092 where the announcement was made and check out all the other awesome PowerCLI goodness that was made available at VMworld, the session is viewable today. It’s also worth mentioning that the session was voted into the Top Ten Sessions of the Day, so I would consider it a ‘must see’! Direct Access to the video available here.

VMworld Sneak Peek: INF8038 – Getting Started with PowerShell and PowerCLI

VMworld US 2016

VMworld Session INF8038 is going to be great regardless of whether you’re new to PowerShell or just in need of a refresher. The session will be packed full of information from getting your PowerShell profile setup to understanding the difference between a module and a snap-in, then starting down the path of using logic statements and even creating your own scripts.

Check out this video by Chris Wahl to get a sneak peek on what to expect:

Don’t forget to register for the session by way of the VMworld Content Catalog!

PowerCLI at VMworld US 2016

VMworld US 2016

It’s August, and that means the countdown to VMworld US has officially begun! Hopefully you’ve already registered. If not, what are you waiting for? We’ve got a ton of great PowerCLI and automation based activities lined up for this year, and some more still in the planning phases. Check back here often to keep up to date.

Sessions

Monday, August 29, 11:00AM to 12:00PM – 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.

Wednesday, August 31, 1:00PM to 2:00PM – Nicholas Bradford & Anthony Burke
NET7514 – PowerNSX and PyNSXv: Using PowerShell and Python for Automation and Mangement 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, August 30, 5:00PM to 6:00PM – Jason Boche & Mike Matthews
STO8923 – PowerShelling Storage to the Extreme: With enterprise vendors providing rich PowerShell snap-ins to their products, just how far can you take these cmdlets? Combining VMware’s cmdlets with cmdlets for servers, storage, networking, and applications, can take the monotony out of day to day tasks, and ensure completion. But why stop there? They’ll take a look at more complex storage-based solutions that can be scripted into simplicity. Let your imagination be the limit!

Monday, August 29, 2:00PM to 3:00PM – Duncan Epping & Chris Wahl
INF8036 – Enforcing a vSphere Cluster Design with PowerCLI Automation: The amount of VMware vSphere data center, cluster, storage, and network options available to an administrator is massive. Even specific features such as High Availability and the Distributed Resource Scheduler have a ton of different configuration settings provided to meet the needs of your specific virtualized workloads. It can be a challenge, however, to audit the settings and best understand why they were set in the first place—especially as other administrators join and leave your organization! In this session, see how they take a look at abstracting vSphere configuration settings into declarative configuration files. Also, learn how to audit, track, and enforce consistent settings to ensure the availability and standardization of your vSphere environment.

Tuesday, August 30, 12:30PM to 1:30PM – 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!

Sunday, August 28, 9:30AM to 10:30AM – Vinith Menon
STO8267 – Hours to Minutes: Automated Provisioning and Deployment Using PowerCLI, vRealize Automation and vRealize Orchestrator: VMware IT has a large project portfolio with over 60 remote sites that need to be provisioned with core footprint virtual machines (VMs). The deployment of these machines requires additional resources and expenses. VM lifecycle management and application configuration (creation to retirement) is time-consuming, error prone and involves manual efforts. The ability to automatically provision new infrastructure and reduce manual efforts is a vital building block to establishing an on-demand model for IT and to better serving the needs of the business by reducing costs and increasing efficiency. The VMware IT Tenant Operations team will discuss its solution using PowerCLI, vRealize Automation (vRA) and vRealize Orchestrator (vRO) that reduces critical provisioning time to configure the footprint VMs from hours to minutes on the EVO VxRail platform.

Group Discussions

Tuesday, August 30, 5:00PM to 6:00PM
INF10730-GD – PowerCLI with Kyle Ruddy and Alan Renouf: Group Discussions are a good way to join together with peers, guided by a VMware expert, and discuss a VMware key topic as selected by the group. Come to this session prepared to dive-in, engage, and share best practices.

Expert Lead Workshop

Thursday, September 1, 1:30PM to 3:00PM – Jon Harris & 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.

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.

Using PowerCLI to Configure Hosts

We’re continuing the video series on learning PowerCLI tips and tricks. Previously, we’ve focused on an introduction, creating reports, and handling the VM lifecycle. We will now be focusing on the host configuration process.

This is one of those processes that admins may not do on an everyday basis, but is a huge time saver once automated. However, the individual commands can be run at any time and not just during the configuration process. Using the New-VirtualSwitch cmdlet as an example, it can be reused on multiple hosts to not just provide a time savings during creation but also provide consistency as the commands are ran on each host. Then, once through the individual steps, the video also takes it a step further and finishes up with a way to tie everything in to a script for an automated workflow.

This video shows how to perform the following tasks easily:

  • Adding a Host to vCenter
  • Putting a Host in Maintenance Mode
  • Assigning a license key to a Host
  • Configuring a Host’s NTP server
  • Creating a Virtual Switch on a Host
  • Creating a Port Group on a Host
  • Enabling vMotion on a Host’s Port Group
  • Creating both VMFS and NFS based datastores on a Host
  • Activating a Host
  • Tying all these actions together into a single script

The entire process takes less than 5 minutes, and the script completes in less than 1 minute!

Watch the Video

Other videos available in the 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.

Updating the VMware PowerCLI Community Repository!

PowerCLI + GitHub
If you’ve ever tried searching for a script or a module before, you know it’s not the easiest thing to accomplish. This sentiment has been coming up more and more as of late. There’s a ton of amazing PowerCLI scripts and modules, PowerActions scripts, DSC resources, and so forth contributed by the community and openly available.

The VMware PowerCLI Community Repository is a central location where anyone can contribute their own resources. The repository features a Principles of Operations document to help guide contributors along the process of using, creating, and updating resources which are contained within the repository.

This community repository will also feature several community members as board members. As part of the board, they will be asked to help maintain the repository with tasks such as testing and providing feedback on all submitted resources, communicating with other board members in order to approve pull requests, and continuing to be good community advocates of PowerCLI and the community repository.

I’d like to thank and welcome the following board members:
Josh Atwell (Community Member)
Luc Dekens (Community Member)
Jonathan Medd (Community Member)
Alan Renouf (VMware)
Kyle Ruddy (VMware)
Rynardt Spies (Community Member)

Now that we have the announcements out of the way, let’s take a look at how to dig in and get started.

Getting Started

Accessing the Repository

Downloading the Repository for Local Access
If you happen to be new to GitHub and want to access the contents of the repository, one of the easiest ways to that is to just download a copy of it directly from GitHub to your local system:

  1. Load the following GitHub repository page: VMware PowerCLI Community Repository
  2. Click on the green “Clone or Download” button and then click “Download ZIP”
  3. Once downloaded, extract the zip file to the location of your choosing
  4. At this point, you now have a local copy of the repository

Download PowerCLI Repository

Creating Your Own GitHub Based Access Point
Another one of the easiest ways to access the repository contents is to “fork” it, which places a copy of the repository within your account:

  1. Login (or signup) to GitHub
  2. Load the following GitHub repository page: VMware PowerCLI Community Repository
  3. Click on the Fork button, which will create a copy of the repository and place it in the GitHub based location of your choosing.

Adding Resources

GitHub – Copy/Paste Option
If you happen to want to contribute a script or other resource and are new to GitHub, you have the ability to copy and paste your resource directly to the repository:

  1. Within the community repository, browse to the appropriate section (example: Scripts)
  2. Select the “Create new file” button
  3. On the new page, enter a file name, enter the resource’s information
  4. Within the “Commit new file” area, enter the title and description, then select “Create a new branch for this commit…” and enter a sensical branch name
  5. Click “Propose new file”
  6. On the “Open a pull request” page, click “Create pull request”

Submit to PowerCLI Repository

GitHub – Upload Files Option
Similarly to the copy and paste option above, you can also upload your resource directly to the repository as well:

  1. Within the community repository, browse to the appropriate section (example: Modules)
  2. Select the “Upload files” button
  3. On the new page, drag or choose the files to add
  4. Within the “Commit changes” area, enter the title and description, then select “Create a new branch for this commit…” and enter a sensical branch name
  5. Click “Propose new file”
  6. On the “Open a pull request” page, click “Create pull request”

GitHub Desktop Client

There are numerous other ways to interact with the community repository other than just the GitHub web interface. The GitHub Desktop is a great way to setup and streamline your interaction with any GitHub Repository. More information is available at GitHub’s Desktop Client Getting Started page.

GitHub Desktop Client

Conclusion

The goal of the VMware PowerCLI Community Repository is to bring the great PowerCLI resources from the community into a central location that’s easy to find, search, use, and contribute to regardless of the user’s technical skill level.

If there’s any questions, comments, or feedback, join us in the VMware Code Slack team’s PowerCLI channel: https://code.vmware.com/slack/