VMware 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.

Installing Onyx for the Web Client

Onyx for the Web Client requires vSphere Web Client version 6.0. Because the installation of Onyx for the Web Client replaces core Web Client files, VMware recommends to install Onyx for the Web Client in a test or development environment only.

Onyx for the Web Client comes with an installation guide, that shows you how to install the software on a Virtual Center Virtual Appliance (VCVA) or on vCenter for Windows.

Using Onyx for the Web Client

The next screen shot shows you Onyx for the Web Client in action. In the top left corner of the window you will see two new buttons. The left button is the start and stop recording button. After starting a recording, PowerCLI code will be created for all of the actions you perform in the web client. To stop recording, push the same button again.

Clicking on the button on the right, will open the Onyx window you can see in the screen shot. The Onyx window shows you the created PowerCLI code.

Onyx for the Web Client screen shot

Downloading Onyx for the Web Client

You can download Onyx for the Web Client and all of the other VMware flings from: Onyx for the Web Client

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Today, my new book Learning PowerCLI – Second Edition was published by Packt. Learning PowerCLI, Second Edition will learn you to leverage the power of PowerCLI to automate your VMware vSphere environment with ease.

Starting with an introduction to the basics of PowerCLI, the book will teach you how to manage your vSphere and vCloud infrastructure from the command line. To help you manage a vSphere host overall, you will learn how to manage vSphere ESXi hosts, and deploy and upgrade ESXi hosts using Image Builder and Auto Deploy.

The upcoming chapters will not only teach you how to create datastores and datastore clusters, but you’ll also work with profile-driven and policy-based storage to manage your storage. To create a disaster recovery solution and retrieve information from vRealize Operations, you will learn how to use Site Recovery Manager and vRealize Operations respectively.

Towards the end, you’ll see how to use the REST APIs from PowerShell to manage NSX and vRealize Automation and create patch baselines, scan hosts against the baselines for missing patches, and remediate hosts. By the end of the book, you will be capable of using the best tool to automate the management and configuration of VMware vSphere.

Compared to the first edition, Learning PowerCLI – Second Edition is updated to vSphere 6.5 and PowerCLI 6.5. Learning PowerCLI – Second Edition contains five new chapters about vSphere Update Manager, vCloud Director and vCloud Air, Site Recovery Manager, vRealize Operations Manager, and using REST API to Manage NSX and vRealize Automation.

What Learning PowerCLI – Second Edition covers

Chapter 1, Introduction to PowerCLI, gets you started using PowerCLI. First, you will see
how to download and install PowerCLI. Then, you will learn to connect to and disconnect
from the vCenter and ESXi servers and retrieve a list of all of your hosts and virtual

Chapter 2, Learning Basic PowerCLI Concepts, introduces the Get-Help, Get-Command, and
Get-Member cmdlets. It explains the difference between PowerShell Providers and
PSdrives. You will see how you can use the raw vSphere API objects from PowerCLI and
how to use the New-VIProperty cmdlet to extend a PowerCLI object.

Chapter 3, Working with Objects in PowerShell, concentrates on objects, properties, and
methods. This chapter shows how you can use the pipeline to use the output of one
command as the input of another command. You will learn how to use the PowerShell
object cmdlets and how to create PowerShell objects.

Chapter 4, Managing vSphere Hosts with PowerCLI, covers the management of the vSphere
ESXi servers. You will see how to add hosts to the vCenter server and how to remove them.
You will work with host profiles, host services, Image Builder, and Auto Deploy, as well as
with the esxcli command and the vSphere CLI commands from PowerCLI.

Chapter 5, Managing Virtual Machines with PowerCLI, examines the lifecycle of virtual
machines – from creating to removing them. Creating templates, updating VMware Tools
and upgrading virtual hardware, running commands in the guest OS, and configuring fault
tolerance are some of the topics discussed in this chapter.

Chapter 6, Managing Virtual Networks with PowerCLI, walks you through vSphere Standard
Switches and vSphere Distributed Switches, port groups, and network adapters. It shows
you how to configure host networking and how to configure the network of a virtual

Chapter 7, Managing Storage, explores creating and removing datastores and Datastore
Clusters, working with Raw Device Mapping, configuring software iSCSI initiators, Storage
I/O Control, and Storage DRS.

Chapter 8, Managing High Availability and Clustering, covers HA and DRS clusters, DRS
rules and DRS groups, resource pools, and Distributed Power Management.

Chapter 9, Managing vCenter Server, shows you how to work with privileges, work with
roles and permissions, manage licenses, configure alarm definitions, alarm action triggers,
and retrieve events.

Chapter 10, Patching ESXi Hosts and Upgrading Virtual Machines, focusses on using VMware
vSphere Update Manager to download patches, creating baselines and baseline groups,
testing virtual machines and hosts for compliance, staging patches, and remediating
inventory objects.

Chapter 11, Managing VMware vCloud Director and vCloud Air, covers connecting to vCloud
servers, retrieving organizations, virtual datacenters, organization networks, and users,
using vCloud virtual machines and appliances, and using snapshots.

Chapter 12, Using Site Recovery Manager, explores the Meadowcroft.SRM module to
manage SRM protection groups, protecting virtual machines and running recovery plans to
migrate or fail-over virtual machines from the protected site to the recovery site.

Chapter 13, Using vRealize Operations Manager, shows you to use alerts, retrieve
recommendations, statistical data, solutions, and traversalSpecs, manage local user accounts
and user roles and create and retrieve reports.

Chapter 14, Using REST API to Manage NSX and vRealize Automation, walks you through
REST APIs with examples from VMware NSX and vRealize Automation using basic
authentication and bearer tokens, XML, and JSON.

Chapter 15, Reporting with PowerCLI, concentrates on retrieving log files and log bundles,
performance reporting, exporting reports to CSV files, generating HTML reports, sending
reports by e-mail, and reporting the health of your vSphere environment with the vCheck

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

A 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.

To get VMware Photon OS running, you can download it from https://vmware.github.io/photon/. I downloaded the Photon OS, Version 1.0 — OVA with virtual hardware v11 and imported into my vSphere environment. If you use the vSphere client, click on File | Deploy OVF Template... to import the OVA file. During the deployment, you have to:

  1. specify the location of the OVA file,
  2. accept the license agreement,
  3. specify the name of the virtual machine,
  4. specify the disk format (Thick Provision Lazy Zeroed, Thick Provision Eager Zeroed, or Thin Provision),

TIP: If you create a template of the first Photon OS virtual machine you install, you can use this template to easily deploy new Photon OS virtual machines.

After starting the Photon OS virtual machine, login with user root. The default password for the Photon OS root user is changeme. You have to change the password during first login.

To start and enable Docker in the Photon OS virtual machine, use the following commands:

  1. systemctl start docker
  2. systemctl enable docker

Now, you are ready to start PowerShell. The command provided by the PowerShell team on GitHub (docker run -it powershell) did not work for me. Docker was not able to find the location of the PowerShell Docker container. A Google search gave me a working command:
docker run -it manojlds/powershell

In the following screenshot of the Photon OS console, you will see the complete session after my initial login until the PowerShell prompt.

Now you can start using PowerShell 6.0 Alpha on VMware Photon OS. Have fun!

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Separate tags by commas
To access this feature, please upgrade your account.
Start your free month
Free Preview