Running PowerShell in a Docker container on VMware Photon OS

PowerShell logoA few days ago Microsoft provided PowerShell as an open source project on GitHub, available on Windows, Linux and macOS! The first open source release is PowerShell 6.0 Alpha. In this blog post, I will show you how to run the new PowerShell version in a Docker container on VMware Photon OS. Read more of this post

Advertisement

VMworld 2015 US General sessions

VMworld 2015
During VMworld US 2015 there were three general sessions. The first and second general session were presented by VMware employees and contained the announcements made by VMware during this VMworld.

The third general session, as always, contained three TED talks. This year all of the talks were about the brains.

This blog post gives you embedded links to the first and second general session. Because the video recording of the third general session was not put online, I embedded previous recordings of the speakers, containing the same content as was presented during the VMworld general session. Read more of this post

New VMware fling: Onyx for the Web Client

PowerCLI logoVMware Onyx has been a very popular fling for many years. You can use Onyx to create PowerCLI code by performing actions in the VMware vSphere client. The created PowerCLI code does exactly what you did in the client. The PowerCLI code can easily be adapted to your own needs.

Unfortunately Onyx was not available for the vSphere Web Client. This was a pitty because since vSphere 5.1, new features were not built into the vSphere client. So you could not use Onyx to create PowerCLI for the new vSphere features. I am very happy that VMware now has released a new fling: Onyx for the Web Client. Read more of this post

PowerCLI 5.8 R1 What’s New?

PowerCLI logoDuring VMworld 2014 VMware announced the vCloud Suite 5.8. One of the components of the vCloud Suite is PowerCLI. The new PowerCLI version is 5.8 R1. The PowerCLI 5.8 R1 features announced during VMworld are:

  • Enhanced startup speed
  • Storage Policy cmdlets
  • Query an OVF/OVA for deployment properties
  • OVF/OVA deployment and configuration
  • Added a filter by tag to more cmdlets
  • Enhanced error reporting
  • Added support for RelatedObject to Get-HardDisk
  • Added filtering support to multiple areas
  • Support for latest version of vCloud APIs
  • New-CIVM cmdlet
  • Support for upcoming version of SRM

These are all great improvements for an already great product. I can’t wait until the vCloud Suite is released to use all of these new features.

Don’t forget that PowerCLI is a free tool and you can use it with all of the vCloud Suite licenses.

You can download PowerCLI from www.vmware.com/go/powercli.

For more information about VMworld go to www.vmworld.com.

New book – Learning PowerCLI

Learning PowerCLI Book CoverI am verry happy to announce that my first book Learning PowerCLI has been published today by Packt Publishing. This book is written for VMware vSphere administrators who want to automate their
vSphere environment using PowerCLI. Learning PowerCLI is written in a friendly and practical style with a focus on getting you started and automating daily tasks quickly and efficiently. If you manage or administrate a vSphere environment, and want to make that easier and more efficient, then this book is for you! It is assumed that you have at least a basic knowledge of VMware vSphere. If you are not a vSphere administrator, but you are interested in learning more about PowerCLI, then this book will also give you some basic knowledge of vSphere. Read more of this post

PowerCLI Get-VICommand function error repaired

PowerCLI logoOn my PC (Windows 8 Pro, Windows PowerShell 3 and VMware vSphere PowerCLI 5.1 Release 2) there is a very annoying problem with the Get-VICommand function. If I use this function without specifying the name of a cmdlet to search for, then I get an “Object reference not set to an instance of an object” error message:

PowerCLI C:\users\robert> Get-VICommand
get-command : Object reference not set to an instance of an object.
At C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1:68 char:3
+   get-command -pssnapin VMware.* -Name $Name
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-Command], NullReferenceException
    + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.PowerShell.Commands.GetCommandCommand

Listing 1. Get-VICommand error message with PowerShell 3.
Read more of this post

Get VMware vCenter Scheduled Tasks with PowerCLI

PowerCLI logoVMware vSphere PowerCLI is missing cmdlets to work with VMware vCenter Scheduled Tasks. In a series of blog posts I will show you some PowerShell advanced functions that you can use to work with vCenter Scheduled Tasks. The first function is Get-VCScheduledTask. You can use this function to retrieve one or more scheduled tasks from your vCenter Server. Read more of this post

Use PowerCLI to consolidate snapshots in vSphere 5

PowerCLI logoIn vSphere 5 a virtual machine can have a “Virtual machine disks consolidation is needed” Configuration Issue warning in the Summary tab. How can you use PowerCLI to see which virtual machines have this warning? And how can you automate the consolidation of the virtual machine’s disks? Read more of this post

How to list all the PowerCLI ESXCLI commands

PowerCLI logoLast week there was a question in the VMware VMTN Communities VMware vSphere PowerCLI forum from Papires who asked how you can convert the ESXCLI command ‘esxcli storage vmfs snapshot mount -l “DATASTORE”‘ into a PowerCLI command. I had not done very much with ESXCLI in PowerCLI, but I knew that it was something like ‘$esxcli.storage.vmfs.snapshot.mount’. However I was struggling with the ‘-l “DATASTORE”‘ part.

There is not much documentation available about the ESXCLI commands in PowerCLI. And also a search in Google did not help me very much. Finally I found the right answer using the PowerShell Get-Member cmdlet. Read more of this post

Use Performance Monitor to get VM performance statistics

PowerShell logoIn PowerCLI you can use the Get-Stat cmdlet to get performance statistics. But for Microsoft Windows virtual machines with the VMware Tools installed there is another way to get the statistics. Even without using PowerCLI. Read more of this post