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: October 11, 2016

Automating the iland Cloud with Microsoft Powershell – Part Two, Automatic Shutdown and Startup

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.

In Part One of this series, we looked at using Powershell to report on aspects of the 11:11 Cloud, and to create new vApps and VMs using simple GET-, NEW-, and SET- commands.

One of the great things about cloud computing environments is the ability to shutdown workloads when they are not needed and therefore not pay for the resources (except storage). Dev/Test is an excellent example of this; whole development environments can be shut down at night or on weekends and then started up again just in time for the developers to use them.

This blog post will look at the concept of storing metadata against the vApps that details when they should be started up and then shut down again. This metadata can then be read by a Powershell script that is run every hour from a management server.

In VMware vCloud Director, metadata key/value pairs can be stored against most objects within the environment – for example, virtual data centers, vApps, and VMs.

There are several ways that these tasks could be performed, but the metadata we have created as shown below seems to work quite well:

  • Day of the week (Every, or MonTueWed, SatSun, etc)
  • Start Time in 24-hour clock format (07, 09)
  • Stop Time in 24-hour clock format (19, 22)
  • AutoOnOff (Yes, No)

Metadata can be stored against objects in vCloud Director either by using the 11:11 Cloud Console, the native vCloud Director web interface, or as we’ll see later, via Powershell.

In the 11:11 Cloud Console, the metadata can be viewed or edited as shown here:Cloud Console 1

Click on Metadata, the following dialog will be shown, and you will see the key/value pairs already created against the Pet Clinic vApp.

Cloud Console 2

The same process works using the vCloud Director native web interface.

vcd_meta_1

Clicking on ‘Properties’ pulls up the key/values pairs for the vApp.vcd_meta_2

The ‘AutoOnOff’ key can be used for a really simple script that checks for the existence of the key and the value being set to ‘Yes’ and will then shut it down.

In the code snippet above, you can see the Get-CIMetaData cmdlet in use. This is a custom-developed cmdlet that we were able to find on the interwebs. This can be referenced as part of your Powershell profile or just included at the top of your script.

The all-singing, all-dancing version of the script can take the following form:

If you have a large number of vApps that you want to add metadata to, Powershell can also be used to set that, using input from an Excel spreadsheet in CSV format.

Create a spreadsheet in Excel similar to the one below.

ExcelSave it in comma-delimited format.

The following script can then be used to update the metadata on the named vApps. Firstly we’ll need to define a cmdlet to create the metadata called New-CIMetaData.

Main body of the script:

Similarly, this short script will enable you to dump out all your metadata into a CSV. This assumes you are already connected to the cloud.

Watch this space for more interesting ways to use Powershell to automate the 11:11 Cloud.

Categories: IaaS, VMwareBy 11:11 SystemsOctober 11, 2016
Tags: Cloud Services
11:11 Systems

Author: 11:11 Systems

Post navigation

PreviousPrevious post:Recovery Times – Key to any DR PlanNextNext post:Can VMs be Too Big for DRaaS?

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}