Mai 042017
 

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&#rsquo;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&#rsquo;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&#rsquo;s a couple of the top tips we have seen on working around them:

  • The process cannot access the file &#lsquo;C:\Users\…\AppData\Local\Temp\…&#rsquo;
    • Ensure previous versions of PowerCLI are uninstalled and all PowerShell sessions are closed.
    • Verify the file isn&#rsquo;t being blocked by an antivirus software.
  • A command with name &#lsquo;verb-noun&#rsquo; 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 &#rsquo;-AllowClobber&#rdquo; 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 &#lsquo;VMware.PowerCLI&#rsquo;
    • This could be due to a lack of connectivity to the PowerShell Gallery.
    • If a proxy can be used, the &#rsquo;Install-Module&#rdquo; cmdlet can configure proxy connectivity with the &#rsquo;Proxy&#rdquo; and &#rsquo;ProxyCredential&#rdquo; parameters.
      Example: Install-Module –Name VMware.PowerCLI –Scope CurrentUser –Proxy &#lsquo;http://my.proxy.company.com&#rsquo;
  • Could not get response from query &#lsquo;https://www.powershellgallery.com/api/v2/package/VMware.VimAutomation.Core/…&#rsquo;
    • 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.

Feb 032017
 

Community feedback has always played an important role in how PowerCLI has evolved and improved. Whether it&#rsquo;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&#rsquo;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&#rsquo;ll have some goodies available as giveaways!

If you&#rsquo;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&#rsquo;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&#rsquo;s Future – Poll appeared first on VMware PowerCLI Blog.

Automating VMware Horizon 7 with VMware PowerCLI 6.5

 Allgemein, Knowledge Base, PowerShell, Updates, VDI, VMware, VMware Partner, VMware Virtual Infrastructure, vSphere  Kommentare deaktiviert für Automating VMware Horizon 7 with VMware PowerCLI 6.5
Jan 242017
 

With VMware PowerCLI 6.5 Release 1, the automation of VMware Horizon 7 matures and we get integrated PowerShell support for the View component of Horizon 7 built into VMware PowerCLI. We have a proper Horizon 7 module that is distributed and ships with the core VMware PowerCLI installation.

For information about all the new features of VMware PowerCLI 6.5 R1, see the New Release: PowerCLI 6.5 R1 blog post.

So, what do we get with the release of the new VMware PowerCLI Horizon 7 module? We actually get three things: the Horizon 7 module itself, access to the View API with online documentation, and a set of advanced functions released on GitHub.

VMware PowerCLI – Horizon 7 Module

Even though the Horizon 7 module contains only two cmdlets, they are extremely useful. These cmdlets allow you to connect and disconnect from the View API service. Importantly, this functionality provides a convenient way to access the full View API and the capabilities normally only available through the Horizon Administrator console.

Unlike previous VMware PowerCLI for Horizon 7 implementations, you can now connect and run VMware PowerCLI scripts for Horizon 7 from remote workstations or servers, such as an administrator&#rsquo;s desktop, using different credentials. You can also easily build federated scripts across VMware assets. For example, you can write a script to get a list of datastores from a vCenter Server inventory and use that information to select the best datastores on which to create a pool.

View API

To accompany the new VMware PowerCLI module, VMware is happy to announce the release of public View API Reference Documentation for Horizon 7 and access to the full public View API. The View API is a web service and is available from any Horizon Connection Server within a Horizon Pod. The View API is used by the Horizon Administrator console for configuration, administration, and monitoring, so we are now exposing programmatic access to all the functionality available in the console.

To make exploring the data objects and methods of interacting with them easier, VMware has created a new Developer Center online API Explorer, a unified interface for all API documentation across the VMware stack.

Advanced Functions

To get you started quickly, the Horizon 7 team has put together a set of functions that cover common operations. These functions allow you to easily interact with pools, farms, and desktops without having to write scripts from scratch. Be sure to visit the VMware PowerCLI Community Repository site on GitHub periodically to get new functions and consider contributing your own.

Installation

Install VMware PowerCLI

  1. Download the VMware PowerCLI 6.5 R1 installer and run the installation wizard.
  2. As part of the installation, you are prompted to change the ExecutionPolicy of PowerShell.
  3. Launch PowerShell (run as Administrator), and run the following command.
Set-ExecutionPolicy RemoteSigned

Install Advanced Functions

  1. Go to the GitHub repository page at https://github.com/vmware/PowerCLI-Example-Scripts.
  2. Click the green Clone or download button and then click Download ZIP.
  3. Extract the zip file and copy the advanced functions Hv.Helper folder to a modules directory.
  4. Check your PowerShell $env:PSModulePath variable to see which directories are in use:
    • User specific: %UserProfile%\Documents\WindowsPowerShell\Modules
    • System wide: C:\Program Files\WindowsPowerShell\Modules
  5. Unblock the advanced functions to allow them to be executed.
    • In a PowerShell prompt (as Administrator), run the following command, tailoring the path to where you copied the VMware.Hv.Helperfolder:
dir &#lsquo;C:\Program Files\WindowsPowerShell\Modules\VMware.HvHelper\&#rsquo; | Unblock-File

Locate documentation

  • Bookmark the View API Reference Documentation.
  • Bookmark the VMware PowerCLI Cmdlets Reference.

Getting Started

Launching PowerShell by using the VMware PowerCLI shortcut created during installation loads all the VMware modules, including the one for Horizon 7. If you use a normal PowerShell shortcut you have to load the modules as part of your script.

You can import all of the VMware modules or just the Horizon 7 module, though you need the Core module too if you plan on interacting with VMware vSphere. To load all the modules, use the following command:

Get-Module -ListAvailable VMware* | Import-Module

To load only the Horizon 7 module or the Horizon 7 module and the Core module, use one or both of the following commands:

Import-Module VMware.VimAutomation.HorizonViewImport-Module VMware.VimAutomation.Core

You can now connect to the Horizon Connection Server and the View API using your credentials:

Connect-HVServer -server horizon1.mydomain.com

In this example, horizon1.mydomain.com is one of the Horizon Connection Servers.

You are prompted for credentials, but you could alternatively include your credentials in the command.

Connect-HVServer -server horizon1.mydomain.com -user demoadmin -password mypassword -domain mydomain

A global variable called DefaultHVServers is created, which stores information about connections to the Horizon Connection Servers. You can access this variable with $Global:DefaultHVServers.

All the interesting stuff is really under ExtensionData. To make working with this property a bit easier we will assign it to a variable $Services1 and take a look.

$Services1=$Global:DefaultHVServers.ExtensionData$Services1

Looking at the View API reference documentation you will start to recognize some of these entries. The ExtensionData property (and now the $Services1 variable) holds access to the entire View API.

Examples

Let&#rsquo;s run a couple of commands and start to explore how we can use the VMware PowerCLI. Remember we have access to the full View API!

First, let&#rsquo;s use a simple View API command and get a list of all the Horizon Connection Servers in the pod. The commands in the following example use the View API service ConnectionServer and method ConnectionServer_List and assign the results to variable $hvServers1. For more information about this service, see the View API reference documentation.

$hvServers1 = $Services1.ConnectionServer.ConnectionServer_List()$hvServers1.General

Next, let&#rsquo;s use one of the advanced functions to get a list of desktops, depending on the state of the Horizon Agent. This listing is useful for understanding the state of the desktops, including whether they are in use, available for new user connections, or in an error state.

The following command returns a list of the desktops which have users logged in but the user is currently disconnected from the desktop:

$DisconnectedVMs = Get-HVMachineSummary -State DISCONNECTED$DisconnectedVMs | Out-GridView

For a complete list of possible states, check out the View API documentation on baseState.

It would be useful to get a list of problem VMs with agent states that include the following:

PROVISIONING_ERROR, ERROR, AGENT_UNREACHABLE, AGENT_ERR_STARTUP_IN_PROGRESS, AGENT_ERR_DISABLED, AGENT_ERR_INVALID_IP, AGENT_ERR_NEED_REBOOT, AGENT_ERR_PROTOCOL_FAILURE, AGENT_ERR_DOMAIN_FAILURE, AGENT_CONFIG_ERROR, UNKNOWN

You can modify the command used above to return a list of desktops with one of these states by replacing the state to check for. For example:

$ProblemVMs = Get-HVMachineSummary -State AGENT_UNREACHABLE

You can take this further and use a script to list desktops with the Horizon Agent in a number of different problem states. You could then carry out tasks to remediate the problems. The following sample script gets all the problem desktops by querying the View API using this advanced function. The script then uses a vSphere command to reboot the problem VMs.

In the script, replace the values for the variables to indicate your Horizon Connection Server, user name, and so on.

Also, consider adding a -WhatIf parameter to the Restart-VMGuest command. A -WhatIf parameter shows you the outcome without actually executing the command.

##################################################################### Get List of Desktops that have Horizon Agent in problem states.# Reboot the OS of each these.#####################################################################region variables#################################################################### Variables ####################################################################$cs = 'horizon1.mydomain.com' #Horizon Connection Server$csUser= 'demoadmin' #User account to connect to Connection Server$csPassword = 'mypassword' #Password for user to connect to Connection Server$csDomain = 'mydomain' #Domain for user to connect to Connection Server$vc = 'vcenter1.mydomain.com' #vCenter Server$vcUser = 'administrator@vsphere.local' #User account to connect to vCenter Server$vcPassword = 'mypassword' #Password for user to connect to vCenter Server$baseStates = @('PROVISIONING_ERROR', 'ERROR', 'AGENT_UNREACHABLE', 'AGENT_ERR_STARTUP_IN_PROGRESS', 'AGENT_ERR_DISABLED', 'AGENT_ERR_INVALID_IP', 'AGENT_ERR_NEED_REBOOT', 'AGENT_ERR_PROTOCOL_FAILURE', 'AGENT_ERR_DOMAIN_FAILURE', 'AGENT_CONFIG_ERROR', 'UNKNOWN')#endregion variables#region initialize#################################################################### Initialize ##################################################################### --- Import the PowerCLI Modules required ---Import-Module VMware.VimAutomation.HorizonViewImport-Module VMware.VimAutomation.Core# --- Connect to Horizon Connection Server API Service ---$hvServer1 = Connect-HVServer -Server $cs -User $csUser -Password $csPassword -Domain $csDomain# --- Get Services for interacting with the View API Service ---$Services1= $hvServer1.ExtensionData# --- Connect to the vCenter Server ---Connect-VIServer -Server $vc -User $vcUser -Password $vcPassword#endregion initialize#region main#################################################################### Main ####################################################################Write-Output ""if ($Services1) { foreach ($baseState in $baseStates) { # --- Get a list of VMs in this state --- $ProblemVMs = Get-HVMachineSummary -State $baseState foreach ($ProblemVM in $ProblemVMs) { $VM = Get-VM -Name $ProblemVM.Base.Name # --- Reboot each of the Problem VMs --- Restart-VMGuest -VM $VM # Add -WhatIf to see what would happen without actually carrying out the action. } } Write-Output "", "Disconnect from Connection Server." Disconnect-HVServer -Server $cs} else { Write-Output "", "Failed to login in to Connection Server." pause }# --- Disconnect from the vCenter Server ---Write-Output "", "Disconnect from vCenter Server."Disconnect-VIServer -Server $vc#endregion main

Summary

These have been fairly simple examples, but these and the installation instructions should be enough to get you going. These examples only scratched the surface of what is possible. Now that you are armed with the new PowerCLI module for Horizon, access to the View API, the documentation, and the advanced functions, you can start to explore new ways of automating your Horizon 7 environment.

Let us know how you get on, what use cases and problems you solve, and be sure to feed your scripts back into the community for others to benefit from.

The post Automating VMware Horizon 7 with VMware PowerCLI 6.5 appeared first on VMware End-User Computing Blog.

Jan 062017
 

Happy 2017 from the VMware Hands-on Labs team! I have three quick updates for you in this post.

1.

We are currently working on our Spring Release, which is when we refresh some of thelabs from the prioryear’s VMworld. Look for some updated content around April of this year.

2.

We havestarted planning the labs for VMworld 2017, which is always an exciting time. If you have a great idea that you would like considered for our 2017 cycle, we have the Hands-on Labs Idea Registry.We accept submissions on this site for the current year until around mid-February. Once youridea is submitted, it will be reviewed and presented to the appropriate VMware Business Unit for consideration.

3.

We have create a few tools todeal with the specialness of runningour lab content in a nested environment. Some of these have proven useful to others in the community who run their own labs.We talk about these tools a bit during our VIP Tours at the VMworld events and are happy to share what we can.A few arecurrently available on GitHub:

  • LabStartup – a framework that we use for checking the status of components within our labs, both at startup time and, now, on a periodic basis. The LabStartupFunctons.ps1 contains some useful functions for checking status and, in some cases, performing remediation.
  • HOL-ModuleSwitcher – a framework for executing PowerShell scripts via a simple “button panel” UI. SupportsStart andStop scripts for each module.

Disclaimer:These scripts are provided “as-is” and may not be appropriate for your environment. Theyare not officially supported by VMware. If you decide to use them, you do so at your own risk.

Most recently, Ihave been overhaulingthe three-tier “application” that we use inside our labs. The basic version is made up of 3 VMs, runs entirelyon Photon OS, and boots in under 30 seconds!

With all of the interest on networking in general, and NSX in particular, we have received some requests for access to this application because it can be really helpful in a lab setting.

Rather than providing a linkto a multi-GB download with VMs that someone else (me) has hacked together, I think it would be more interestingto explain how this application isput together. My goal for this projectisto have something small,simple, and understandable.Usingas many default components and settings as possible helps get there.Itis not currently implemented using something sexy likecontainers, although it can be reworked that way if you are so inclined.

In some upcoming posts, I will describe this application and how it isconstructed using the base Photon OSv1.0 OVA as a starting point. If you want to see what the current ConeOS-based versionlooks like, you can check out one of the NSX labs like HOL-1703 or HOL-1725. The new version is slightly different, but the idea is the same.

Thanks for reading and enjoy your labs!

The post Happy New Year appeared first on VMware Hands-On Lab (HOL) Blog.

Spotlight on the Move-VM Cmdlet including PowerCLI 6.5 Enhancements

 Allgemein, Knowledge Base, PowerShell, Updates, VMware, VMware Partner, VMware Virtual Infrastructure, vSphere  Kommentare deaktiviert für Spotlight on the Move-VM Cmdlet including PowerCLI 6.5 Enhancements
Jan 042017
 

VMware PowerCLI 6.5&#rsquo;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&#rsquo;s something that cannot be done by the web client!

Let&#rsquo;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&#rsquo;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&#rsquo;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&#rsquo;s Network Adapter/s
  • Destination vCenter
    • Destination ESXi Host
    • Destination Datastore
    • Destination PortGroup/s

Here&#rsquo;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 $destVCConnMove-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&#rsquo;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&#rsquo;s an example of doing a Cross vCenter vMotion on a VM that has multiple NICs:

Conclusion

The above examples are just the tip of showing just how versatile the Move-VM cmdlet really is. Let us know how you&#rsquo;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.

Nov 302016
 

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&#rsquo;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&#rsquo;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&#rsquo;re recommending a replacement from that command to this command:

Get-Module –ListAvailable VM* | Import-Module

We&#rsquo;re not going to leave the rest to you to handle. There&#rsquo;s some functions which have been added to the PowerCLI Community Repository which will point out which scripts contain that line. There&#rsquo;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 &#rsquo;Get-PowerCLISnapinUse&#rdquo; and will show what scripts (.ps1 extensioned) include the string &#rsquo;Add-PSSnapin*VM*&#rdquo; and will display the file name, line where the string resides, path to the directory, and the full path of the file.

The second function is &#rsquo;Update-PowerCLISnapinUse&#rdquo; and is based around adding the new Import-Module command and commenting that string out.

Additionally, if you&#rsquo;ve already updated your version of PowerCLI, you may have noticed the installation directory has changed as well. If you have the &#rsquo;Initialize-PowerCLIEnvironment&#rdquo; script hardcoded into your scripts, there are also some functions to handle that as well. The functions for that are done by way of &#rsquo;Get-PowerCLIInitialization&#rdquo; and &#rsquo;Update-PowerCLIInitialization&#rdquo;. These functions work similarly to the above, however the &#rsquo;Update-PowerCLIInitialization&#rdquo; 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&#rsquo;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.

PowerCLI Core Fling – Available For Download!

 Allgemein, Knowledge Base, PowerShell, Updates, VMware, VMware Partner, VMware Virtual Infrastructure, vSphere  Kommentare deaktiviert für PowerCLI Core Fling – Available For Download!
Okt 182016
 

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&#rsquo;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&#rsquo;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&#rsquo;t forget the feedback!

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

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

 Allgemein, Knowledge Base, PowerShell, Updates, VMware, VMware Partner, VMware Virtual Infrastructure, vSphere  Kommentare deaktiviert für VMworld Sneak Peek: INF8038 – Getting Started with PowerShell and PowerCLI
Aug 182016
 

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!

The post VMworld Sneak Peek: INF8038 – Getting Started with PowerShell and PowerCLI appeared first on VMware PowerCLI Blog.

Updating the VMware PowerCLI Community Repository!

 Allgemein, Knowledge Base, PowerShell, Updates, VMware, VMware Partner, VMware Virtual Infrastructure, vSphere  Kommentare deaktiviert für Updating the VMware PowerCLI Community Repository!
Jul 262016
 


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

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”

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.

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/

The post Updating the VMware PowerCLI Community Repository! appeared first on VMware PowerCLI Blog.

Microsoft DNS integration with vRealize Automation

 Allgemein, Knowledge Base, PowerShell, Updates, VMware, VMware Partner, VMware Virtual Infrastructure, vSphere  Kommentare deaktiviert für Microsoft DNS integration with vRealize Automation
Aug 102015
 
By: Chris Alleaume, Trimax Americas / Dataglove Inc. INTRODUCTION In particular use cases, customers using vRealize Automation either decide not to use IPAM or perhaps have an isolated environment while there is a need to integrate with Microsoft DNS Servers directly. Throughout the last few years in the field, I've never really come across a […]]> http://blogs.vmware.com/management/2015/08/microsoft-dns-integration-vrealize-automation.html/feed 0 Stay Ahead of Your Storage Needs with VMware vRealize Operations http://blogs.vmware.com/management/2015/08/stay-ahead-of-your-storage-needs-with-vmware-vrops.html?utm_source=rss&utm_medium=rss&utm_campaign=stay-ahead-of-your-storage-needs-with-vmware-vrops http://blogs.vmware.com/management/2015/08/stay-ahead-of-your-storage-needs-with-vmware-vrops.html#comments Fri, 07 Aug 2015 16:09:04 +0000

Improve vRealize Orchestrator Workflows for Efficiency and Scalability

 Allgemein, Knowledge Base, PowerShell, Updates, VMware, VMware Partner, VMware Virtual Infrastructure, vSphere  Kommentare deaktiviert für Improve vRealize Orchestrator Workflows for Efficiency and Scalability
Mai 282015
 
Are you struggling to organize your vRealize scripts or workflows? Ted Spinks—VMware's TAM Tech Lead for Cloud Automation Portfolio—shows you techniques to maximize efficiency and scalability with scripts and workflows. The blog addresses some handy tips, like: How multiple scripts within a workflow can share connections to avoid over-consumption Applying these techniques to the vSphere […]]> Are you struggling to organize your vRealize scripts or workflows? Ted Spinks—VMware's TAM Tech Lead for Cloud Automation Portfolio—shows you techniques to maximize efficiency and scalability with scripts and workflows. The blog addresses some handy tips, like:
  • How multiple scripts within a workflow can share connections to avoid over-consumption
  • Applying these techniques to the vSphere Tagging use case addressed in an earlier Cloud Management blog post
  • Bonus integration techniques for vRealize Automation
  • Setting up error handling to prevent orphaned PS Sessions and vCenter connections from causing issues

Spinks specializes in the automotive manufacturing industry. Read the full blog article "Optimizing PowerShell workflows in vRealizeOrchestrator."


 

Ted Spinks is a Technical Account Manager at VMware, focused on serving Detroit's global automotive manufacturing customers. Ted is also a TAM Tech Lead for VMware’s Cloud Automation portfolio, helping customers from across the VMware TAM community achieve success as they tackle their automation and integration challenges.

Optimizing PowerShell workflows in vRealize Orchestrator

 Allgemein, Knowledge Base, PowerShell, Updates, VMware, VMware Partner, VMware Virtual Infrastructure, vSphere  Kommentare deaktiviert für Optimizing PowerShell workflows in vRealize Orchestrator
Mai 272015
 
In my previous blog post, we walked through configuring vRO’s PowerShell Plug-In and calling some PowerShell and PowerCLI scripts from within our vRO workflows. In this post, we’ll take things a step further, and organize our scripts and workflows using techniques that maximize their efficiency and scalability. We’ll start by learning how multiple scripts within […]]> http://blogs.vmware.com/management/2015/05/optimizing-powershell-workflows-vrealize-orchestrator.html/feed 0 Understanding the Density badge – vRealize Operations Tech Tips #14 http://blogs.vmware.com/management/2015/05/understanding-density-badge-vrealize-operations-tech-tips-14.html?utm_source=rss&utm_medium=rss&utm_campaign=understanding-density-badge-vrealize-operations-tech-tips-14 http://blogs.vmware.com/management/2015/05/understanding-density-badge-vrealize-operations-tech-tips-14.html#comments Tue, 26 May 2015 10:00:14 +0000

Assess the Performance Impact of the Security Change in Transparent Page Sharing Behaviour

 Allgemein, Knowledge Base, PowerShell, Updates, VMware, VMware Partner, VMware Virtual Infrastructure, vSphere  Kommentare deaktiviert für Assess the Performance Impact of the Security Change in Transparent Page Sharing Behaviour
Jan 142015
 

Here’s a visualization we put together to help people understand the various offerings from VMware that can positively affect your levels of availability.

Hope you like it!

VMware-Availability  <click here for pdf>

Assess the Performance Impact of the Security Change in Transparent Page Sharing Behaviour

 Allgemein, Knowledge Base, PowerShell, Updates, VMware, VMware Partner, VMware Virtual Infrastructure, vSphere  Kommentare deaktiviert für Assess the Performance Impact of the Security Change in Transparent Page Sharing Behaviour
Jan 142015
 

Here’s a visualization we put together to help people understand the various offerings from VMware that can positively affect your levels of availability.

Hope you like it!

VMware-Availability  <click here for pdf>
Mai 052014
 
I recently had the need to create many IP Pools (also known as Network Protocol Profiles) for some projects I have been working on. I was able to flip through my copy of ”VMware vSphere PowerCLI Reference” and leverage a script on creating IP Pools. Not only did I need a way to create IP […]]> I recently had the need to create many IP Pools (also known as Network Protocol Profiles) for some projects I have been working on. I was able to flip through my copy of ”VMware vSphere PowerCLI Reference” and leverage a script on creating IP Pools. Not only did I need a way to create IP Pools using PowerCLI, I also needed a way to remove them as well. A quick Google search didn’t return any results on the topic so I went ahead and created a simple function that allows the user to remove them.

As you can see I currently have two pools in my virtual Data Center “SDT”

The function requires the user to know the name of the virtual Data Center that the IP Pool is located in, and the name of the IP Pool. After the function is added into the PowerCLI session, it can be called by typing ‘Remove-IPPool <vDC Name> <IP Pool Name>’

You will notice the task will appear in the “Recent Tasks” window once the function has run. If you are looking at the Network Protocol Profiles you will need to refresh the window to see the changes visually.

The function is found below. You may also CLICK HEREto download the script in a .zip

Function Remove-IPPool {
<#
.Synopsis
This function will remove IP-Pools from vCenter
.Description
This function will remove IP-Pools from vCenter based on the inputs provided
.Example
Assuming my datacenter was ‘westwing’ and my IPPool was ‘IPPool1′
remove-ippool westwing IPPool1
.Notes
Author: Brian Graf
Role: Technical Marketing Engineer, VMware
Last Edited: 05/01/2014
#>

[cmdletbinding()]
Param (
[Parameter(ValueFromPipeline = $true, valuefrompipelinebypropertyname = $true)]
[String]$Datacenter,
[Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
[String]$PoolName
)

Process {
$dc = (Get-datacenter $Datacenter)
$dcenter = New-Object VMware.Vim.ManagedObjectReference
$dcenter.type = $dc.ExtensionData.moref.type
$dcenter.Value = $dc.ExtensionData.moref.value

$IPPoolManager = Get-View -Id ‘IpPoolManager’
$SelectedPool = ($IPPoolManager.QueryIpPools($dc.ID) | Where-Object { $_.Name -like $PoolName })


$IPPool = Get-View -Id ‘IpPoolManager-IpPoolManager’
$IPPool.DestroyIpPool($dcenter, $SelectedPool.id, $true)


}

}