Skip to content
11:11 Systems
Rethink Connected
11:11 Systems11:11 Systems
  • Why 11:11
    • Submenu
      • Column 1
        • Cloud Console
          Cloud Console
          Compliance
          Compliance

      • Column 2
        • Global Regions
          Cloud Regions
          Catalyst
          Planning and Assessment

      • WHY CHOOSE 11:11
      • Overview
      • Leadership
      • News & Media
      •  
      • Careers
      • Technology Partners
      • Customer Stories
  • Products & Services
    • Products & Services
      • CLOUD
      • Cloud Overview
      • Public Cloud
      • Private Cloud
      • Object Storage
      • Cloud Labs
      • Colocation/Bare-Metal
      • BACKUP
      • Backup Overview
      • Veeam Backup
      • Microsoft 365 Backup
      • Managed Backup for Cohesity
      • DISASTER RECOVERY
      • DRaaS Overview
      • DRaaS for Veeam
      • DRaaS for Zerto
      • DRaaS for Azure
      • Autopilot
      • SECURITY
      • Security Overview
      • Continuous Risk Scanning
      • Managed SIEM
      • Managed EDR
      • Managed Firewall
      • CONNECTIVITY
      • Connectivity Overview
      • SD-WAN
      • Multi-Cloud Connect
      • Managed IP
  • Solutions
    • Solutions Submenu
      • INDUSTRY
      • Education
      • Financial
      • Government
      • Healthcare
  • Partners
    • Partners Submenu
      • Overview
      • Become a Partner
      • Partner Portals
  • Resources
    • Resources Submenu
      • Events
      • Webinars
      • News & Media
      • White Papers
      • Podcast
      • Data Sheets
      • Customer Stories
      • Innovation Blog
  • Support
    • Support Submenu
      • Contact Support
      • Product Documentation
      • API Documentation
Search:
  • Console Login
  • Contact
Header Right Menu
Free Trial
  • Why 11:11
    • Cloud Console
    • Compliance
    • Cloud Regions
    • Planning and Assessment
    • WHY CHOOSE 11:11
    • Overview
    • Leadership
    • News & Media
    • Careers
    • Technology Partners
    • Customer Stories
    • Blog
  • Products & Services
    • CLOUD
    • Cloud Overview
    • Public Cloud
    • Private Cloud
    • Object Storage
    • Cloud Labs
    • Colocation/Bare-Metal
    • BACKUP
    • Backup Overview
    • Veeam Backup
    • Microsoft 365 Backup
    • Managed Backup for Cohesity
    • DISASTER RECOVERY
    • DRaaS Overview
    • DRaaS for Veeam
    • DRaaS for Zerto
    • DRaaS for Azure
    • Autopilot
    • SECURITY
    • Security Overview
    • Continuous Risk Scanning
    • Managed SIEM
    • Managed EDR
    • Managed Firewall
    • CLOUD CONNECTIVITY
    • Connectivity Overview
    • SD-WAN
    • Multi Cloud Connect
    • Managed IP
  • Solutions
    • INDUSTRY
    • Education
    • Financial
    • Government
    • Healthcare
    • Column 2
  • Partners
    • Overview
    • Become a Partner
    • Partner Portals
  • Resources
    • Events
    • Webinars
    • News & Media
    • Whitepapers
    • Podcast
    • Datasheets
    • Customer Stories
    • Innovation Blog
  • Support
    • Contact Support
    • Success Center
    • API Documentation
  • Contact
  • Console Login
  • Free Trial
Tags: Cloud Services
Author: 11:11 Systems
Date: September 28, 2016

Automating the 11:11 Cloud using Microsoft Powershell and PowerCLI – Part One

GearsEditor’s Note: As of January 2022, iland is now 11:11 Systems, a managed infrastructure solutions provider at the forefront of cloud, connectivity, and security. As a legacy iland.com blog post, this article likely contains information that is no longer relevant. For the most up-to-date product information and resources, or if you have further questions, please refer to the 11:11 Systems Success Center or contact us directly.

We often get questions from customers about the best way to automate their cloud environments. As 11:11 Systems provides Infrastructure-as-a-Service based on VMware vCloud Director, we expose a RESTful API that can be used to automate things at the vCD level.

We also offer a higher-level REST API for the 11:11 Cloud Console, which exposes other services that 11:11 has curated into the console, such as vSphere performance data, security and compliance data, and disaster recovery services with Zerto.

More information on the 11:11 REST API is available here.

As well as RESTful APIs, another set of tools that leverage these APIs has proved extremely popular over the past few years: Microsoft Powershell and the extensions provided by VMware as PowerCLI provide an excellent environment to automate a VMware-based cloud infrastructure, such as that provided by the 11:11 Cloud Platform.

Anyone who has done any development during their career should be able to understand the syntax of PowerCLI for simple scripting or full-blown applications.

Microsoft provides an excellent integrated scripting environment (ISE) that enables a PowerCLI developer to easily discover commands, known as cmdlets, and interrogate the data that is returned from these. The IntelliSense capability helps to automatically complete commands and object names.

We don’t propose to go into great detail about how to get PowerCLI running, but suffice to say it can be downloaded from Microsoft and VMware websites. In recent news, Powershell, which traditionally only ran on Windows operating systems due to its dependence on .NET, has just been ported to both Linux and Apple Mac. PowerCLI cmdlets for Linux and Mac should be available soon. In the meantime, you may use PowerCLI running on Windows 10 on Mac inside VMware Fusion.

Powershell ISE can be made to automatically load all the PowerCLI cmdlets using the profile feature, whereby you can specify all the PowerCLI. Several additional PowerShell functions have been written by ecosystem members that can be included in this way and can be downloaded from various forums and blogs on the Internet.

Pic2

PowerCLI can be used for a variety of automation tasks. Generally speaking, there are a small number of main functions:

  • GET – retrieve information about stuff
  • SET – change attributes
  • NEW – create new things (but also ADD)
  • REMOVE – delete things
  • START/STOP/SUSPEND — operates virtual machines
  • CONNECT/DISCONNECT — log in and out of a vCloud environment

The full set of PowerCLI cmdlets can be found at: http://pubs.vmware.com/vsphere-60/index.jsp?topic=%2Fcom.vmware.powercli.cmdletref.doc%2FOverview.html

Simple GET cmdlets
A good starting point is querying the vCloud environment using GET commands. As the name suggests, this gets information without changing anything, so it is safe for beginners!

Before we can do anything, we’ll need to connect to the vCloud environment, using the same URL as indicated by the 11:11 Cloud Console interface when you choose to interact with vCloud Director.
The PowerCLI cmdlet Connect-CIserver is used with –server, -user, -password, and –org to specify those details.

Pic3-1
Having successfully connected, you can start running GET commands. Many of the vCloud cmdlets have ‘CI’ in front (cloud infrastructure), to differentiate them from vSphere/vCenter cmdlets. So, Get-CIVM instead of Get-VM.

In the example below, Get-OrgVdc is used to get information about our two Org Virtual Data Centres, both of which are pay-as-you-go.

Then, Get-CIVapp is used to list all the vApps that are currently deployed. Finally, list all the VMs using Get-CIVM.

Pic4

You can use the format table command (ft) to format the output neatly and specify the column headings you’d like to see.

Pic 5

Rather than using individual cmdlets on the command line, you can start to produce scripts that perform a similar function to the above.

In the example below, $vApps is an array that contains all the vApps and their configuration data, while $VMs is an array for all the VMs that are discovered. $vApp and $VM are then objects which contain individual data.

Pic 6

The IntelliSense feature within Powershell ISE allows you to see what information is stored within an object.

Pic 7
When the script is executed, the following output is produced. Rather than writing to the screen, it could be exported to an Excel or CSV file.

Pic 8

Automating the deployment of vApps
PowerCLI can be used to deploy new vApps from existing vApp templates within the vCloud catalog. This could be either from your own catalog or from the public catalog offered by 11:11. The cmdlet get-civapptemplate will show you all the vApp templates available.

Pic 9

In this example, we want to deploy the Travel App vApp template from the test catalog and call the new vApp “Travel App 1.”

Pic 10

This short script deploys the new vApp in a matter of minutes. By default, the vApp will be powered off.

Pic 11

We may want to make some changes to the VMs within the vApp once deployed. For example, you may want to give the “MySQL server” 4GB of RAM – it currently has only 750MB.

Unfortunately, there isn’t a nice, easy Set-CIVM cmdlet, so we need to do some jiggery-pokery using extension data. Fortunately, a quick trundle ’round the Internet found the commands to use.

Pic 13

And, we can see that the RAM value has been increased on the “MySQL server” VM.

Pic 13

Finally, the vApp can be started up.

Pic 14

Hopefully, this short article has been useful to whet the appetite for Powershell and PowerCLI.

Watch this space for more articles on this exciting topic!

For further reading, we can recommend our VMware friend and colleague, Alan Renouf, and his blog site at http://www.virtu-al.net/ – what he doesn’t know about PowerCLI isn’t worth knowing!

Categories: IaaS, VMwareBy 11:11 SystemsSeptember 28, 2016
Tags: Cloud Services
11:11 Systems

Author: 11:11 Systems

Post navigation

PreviousPrevious post:Infographic – The State of IT Disaster Recovery in the UKNextNext post:Recovery Times – Key to any DR Plan

Related Posts

Preparing for 2023 with 11:11 Systems: IT Trends in Security, Cloud, and More
February 1, 2023
How businesses can respond to IT disruptions during the holiday season
How businesses can respond to IT disruptions during the holiday season
January 4, 2023
Celebrating Get To Know Your Customers Day
October 20, 2022
What Our Customers Have to Say About 2022’s Most Pressing Cloud Challenges
June 10, 2022
Have you thought about IaaS? 11:11 Cloud is the one for you.
November 5, 2020
Why do you need a global footprint for your cloud?
October 26, 2020
PRODUCTS & SERVICES
  • Cloud
  • Backup
  • Disaster Recovery
  • Managed Security
  • Connectivity Solutions
  • Compliance
COMPANY
  • Why 11:11
  • Customer Stories
  • Careers
  • Leadership
  • Technology Partners
  • News & Media
  • Contact Support
CLOUD REGIONS
  • North America
  • EMEA
  • APAC
CONNECT
  • LinkedIn
  • Twitter
  • Facebook
  • Youtube

© 2023 11:11 Systems Inc., All Rights Reserved | Privacy Notice

Go to Top
PRIVACY POLICY AND COOKIE CONSENT
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}
PRIVACY POLICY AND COOKIE CONSENT
To provide the best experiences, we use technologies like cookies to store and/or access device information that allows us to process data such as browsing behavior. Not consenting or withdrawing consent, may adversely affect certain features and functions. By clicking Accept, closing this message, or continuing to browse, you consent to these technologies and accept our Privacy Notice.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}