In this last part of this series (for now) we will show how to use containers to run your PowerShell/PowerCLI scripts on the deployed instances. And although technically not a ‘real‘ cloud-init post, I consider it related to Part 1, Part 2 and Part3 in this series.Continue reading Cloud-init – Part 5 – Running Containers
For now, the second to last part in this series. And although technically not a ‘real‘ cloud-init post, I consider it related to Part 1, Part 2 and Part3 in this series. In this post I’ll show how you can run scripts on these ‘cattle‘ stations we just deployed.Continue reading Cloud-init – Part 4 – Running Scripts
The main reason to use Photon OS is that it is open-sourced, it has a small footprint and it is optimised for VMware vSphere.Continue reading Cloud-init – Part 3 – Photon OS
In Cloud-init – Part 1 – The Basics, we laid the groundwork for using cloud-init in a vSphere environment. In this post we will go into more advanced Ubuntu setups. This includes deploying PowerShell, v6 and v7, using repositories and if needed, a GUI with Visual Studio Code.Continue reading Cloud-init – Part 2 – Advanced Ubuntu
One of the important DevOps adagios in my book is “Treat your servers as cattle, not as pets”. Meaning that you roll out your stations when you need them, use them and throw them away after you used them. This series of posts will document one such way of deploying such ‘cattle’ stations. The method is named cloud-init.
In this first part, we will introduce cloud-init and how you can use it from your PowerShell/PowerCLI scripts. Since the Ubuntu distribution is very popular, on-premises and in the cloud, this introduction will focus on that distro to demonstrate the concept. In the following parts, we will tackle Photon, containers and how to run your scripts on these stations.Continue reading Cloud-init – Part 1 – The Basics
My InvokeVMScriptPlus function serves me well while interacting with the guest OS on a VM. And I’m apparently not the only one that uses the function. This post introduces Invoke-VMScriptPlus v3.
In this v3 version, I introduce some new features to the function.
- PSv6 and PSv7 support
- Use files (input and output) from within your scripts
- improved sudo support
Update April 15th 2020
- Added SkipCertificateCheck switch
Update January 16th 2020
- Bug fix which occured when connected to an ESXi node
Update November 18th 2019
- Added NoIPinCert switch
How often have you been finding out the PowerShell version you were using, or to which vSphere Server you were connected, or in which git repo/branch your code was being stored, or… Despair no more, it can now be available at your fingertips.
The following is a write up of a part of session HBI1729BU ,that was presented at VMworld US 2019.
The code shown in this post is also available in the PowerCLI Community Repository.Continue reading At Your Fingertips
A guest post
Over the last couple of weeks, it has been my great pleasure to assist Chip Zoller in writing a VMware PowerCLI script, named Optimize-VMwarePKS. This script helps organise your PKS deployment at three levels: folders, tags and DRS rules, including functionality to run a clean up.
The following post by Chip describes the function in greater detail, and shows how you can use it.
This post also appears on the Sovereign Systems website as Optimize-VMwarePKS: A PowerShell Script for All Your VMware PKS Deployment Needs.
Take it away Chip.Continue reading Optimize-VMwarePKS
On December 13th 2018 the PowerCLI Team provided us with an early end-of-year present. The Desired State Configuration Resources (DSCR) for VMware are published, and they are open sourced!
If you missed the announcement, hold what you are doing, and go read the VMware PowerCLI blog post Getting Started with Desired State Configuration Resources for VMware right now!
The next question on your mind is probably “How can I contribute?“. Well, with the correct tools and some VMware PowerCLI knowledge, it turns out that this is not too difficult. What follows is my first attempt at contributing to the Desired State Configuration Resources for VMware.
Before you need to reboot a VM, or do some destructive maintenance on there, it is a good practice to at least tell the user(s) of that VM what is going to happen. But how do you address the users of a VM? They can be connected to a console (local) or via a RDP session (remote). And how do you get their reply back?
Exactly such a question appeared in the VMTN PowerCLI Community recently. And after some digging, it seems that is possible through a PowerShell script that uses the Remote Desktop Services API, provided through the wtsapi32.dll. Note that the VMs we are looking at, all are running a Windows guest OS.