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 […]
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 […]
With PowerShell 3.0 and onwward you can easily convert a SubnetMask in bit form to a “real” dotted 4 octet format: Reverting that operation is a bit trickier, but easily handable as well: UPDATE: be careful when trying to convert IP addresses with leading zeros, as described in this post.
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() […]
When using the vCAC mgmtContext you can get and set any exposed property in the repository. When I recently used that to set the “CurrentTask” property of a VirtualMachine object I noticed that the initial value of the property was “null” but when I wrote a PowerShell ‘$null’ value into it to reset it to its initial state, actually an […]
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 […]
Despite VMware’s efforts to make vCAC look more appealing our customers still like a GUI that actually looks as if it was from this century. And it is really no […]
As you know vCAC provides a REST interface for its repository that you can use to manipulate most of its entities. Although the calling convention for this (ODATA based) REST interface is quite clear and among others Tom provided a few hints and some sample scripts on how to query things it is quite a burden to get this on […]
I recently wrote about on how to use the mgmtContext from vCAC so that you can use it outside the script/file repository of vCAC. With it you can easily access VirtualMachines, GlobalProperties without the need to use the ODATA REST interface of vCAC. However, when you first grab a virtual machine you might have wondered why you do not get […]
Yesterday I opened a Service Request at VMware because I had problems registering a vCAC host within vCO. The error (again) was related to SSL certifcate issues and that the […]
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 […]
[UPDATE 2014-02-16] For an introduction of vCAC other models have have a look at Investigating vCAC 5.2 Models. One of the cool features of vCAC is the ability to hook […]
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 […]
When retrieving a machine property in the Workflow Designer of vCAC that does not exist and later on access the internal workflow variable holding that machine property value you will […]
Another bug in the OSCEXO module… When searching for mails within a mailbox well known folder with more than “PageSize” messages the cmdlet Search-OSCEXOEmailMessage never return and keeps “searching” forever (or until you run out of memory – whatever happens first). The reason behind this is that the code that handles the “ExchangeService.FindItems()” calls does not increase the PageOffset and […]