PowerShell 1

Notifiying Users in vCAC via ‘Recent Events’

During long running provisionings you may want to inform the user about the states you are currently processing. In my previous blog post I showed how to add a text to the ‘CurrentTask’. But maybe you want to give the user a little bit more information where the status field does not provide enough space. Especially in case of a […]

PowerShell 1

Decrypting Passwords in vCAC ConnectionCredentials

Suppose you provision a virtual machine to a vCenter and then want to change the socket/core ratio of that machine as described in vCloud Automation Center – vCAC – Workflow and Script to Change CPU’s to Cores. For this to actually work you not only need the vCenter address but also some valid credentials you can use to connect to […]

PowerShell 0

Resolve and Determine vCAC Machine Type

Here is a way how to quickly determine the machine type to be deployed without resorting to the ‘VirtualMachineExt’ object (which by the way is not yet available in the ‘BuildingMachine’ state): In case you wonder what other machine types exist you can check the enumeration like this: Though this can easily be achieved in a different manner, the point […]

PowerShell 0

Setting XML namespaces in XmlTextWriter correctly

Using [System.Xml.XmlTextWriter] in combination with [System.IO.StringWriter] you can easily create an arbitrary large XML document in memory on the fly. Creating and closing elements and attributes comes down to a simple pair of WriteStartelement()/WriteEndelement() and WriteAttributeString(). However when you want to create namespaces in your XML document things get a little bit trickier as the accompanying MSDN documentation for WriteAttributeString() […]

PowerShell 0

vCO PowerShell Plugin: Import-CliXml fails with System.Security.Cryptography.CryptographicException

When using the PowerShell plugin for vCenter Orchestrator (vCO) you might receive a ‘System.Security.Cryptography.CryptographicException’ exception when using ‘Import-CliXml’ with a PSCredential object. Furthermore, you might get the message: ‘The requested operation cannot be completed. The computer must be trusted for delegation and the current user account must be configured to allow delegation’. The reason behind this seems that the security […]

PowerShell 0

Programmatic way to get valid values for a Cmdlet parameter

Recently I needed a programmatic way to check valid arguments for a Cmdlet that were defined by a “ValidateSet”. I came across the article from Jeffrey Snover “Programmatic way to get valid string values for a parameter” but the mechanism did not seem to work (unless you start PowerShell with the “-Version 1” or “-Version 2” parameter). As this article […]

PowerShell 0

[System.Net.ServicePointManager]::CheckCertificateRevocationList not working when using Invoke-Command or New-PSSession

When you use a Invoke-Command or New-PSSession Cmdlet you might run into an error stating that the Certificate recovation list could not be checked. When you set the corresponding property – you still get the same error message. This is because the aforementioned Cmdlets do not honour this setting (whereas they honour to bypass all certificate validation). Instead they implement […]