This is a rather quick one and I am merely writing it down as I tend to forget … If you need a quick way to get a hex representation in string form (of a byte array or any string) you can use this fragment. You certainly can combine this with some hash computation if you do not want a […]
Did you ever want your Cmdlets tp support pipeline input but never took the time to correctly implement it? There is an easy way of handling input either from pipeline or as a parameter (regardless it being a sigle object or an array of objects). You just have to decorate a generic input parameter with the “ValueFromPipeline” attribute and iterate […]
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 […]
When you provision a machine in vCAC you will probably integrate with other systems in your infrastructure like IPAM, AD, ITSM and the like. Sometimes this ia a lengthly process. […]
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.