Monthly Archives: August 2019


PowerCLI “The Aspiring Automater’s Guide” by Altaro

PowerCLI

If you currently use PowerCLI to automate basic tasks with pre-defined scripts, you’ll already know how powerful automation can be. However, taking the next step and customizing scripts to carry out tasks specifically designed for your needs opens a whole new world of opportunities. This new eBook from Altaro takes you there.

Written by VMware vExpert Xavier Avrillier, this free eBook presents a use-case approach to learning how to automate tasks in vSphere environments using PowerCLI. We start by covering the basics of installation, set up, and an overview of PowerCLI terms. From there we move into scripting logic and script building with step-by-step instructions of truly useful custom scripts, including:

  • How to retrieve data on vSphere objects
  • Display VM performance metrics
  • How to build HTML reports and schedule them
  • Basics on building functions
  • And more!

Stop looking at scripts online in envy because you wish you could build your own scripts. Download PowerCLI: The Aspiring Automator’s Guide now and get started on your path to automation greatness!

 


How to use Azure State Configuration to open specific firewall ports

Azure Automation State Configuration is an Azure service that allows you to write, manage and compile PowerShell Desired State Configuration and assign them to target nodes.  Just like in an on oremise environment you can easily manage (virtual) machines running on Azure and also On Premise.

Using DSC it’s possible to set an (security) baseline to all your virtual machines. In this blogpost I describe how to enable specific ports from the Windows Server firewall.

Here is an example of a configuration file I use. As you can see I’m making use of the xNetworking module.

First you have to import the xNetworking module to Azure. Therefore go to your automation account. Go to Shared Resources, Modules and select Modules :
DSC01
Notice the Browse gallery in the upper pane :
DSC02
Now import the xNetworking module,
Now you can the add the code above to open a firewall port. In my example I opened (incoming) port 80.
There are several options although. You can find more information here.
You can use the following command’s on your node to update the configuration :

(This command checks the pull server for an updated configuration and applies it)

(This command applies the configuration to the node)