With the advent of PowerCLI for vCloud Director the reasons for using vCenter Orchestrator (vCO) blur even more. VMware provides us several CmdLets that we can all find in the “VMware.VimAutomation.Cloud” snapin (“Get-Command -Module VMware.VimAutomation.Cloud”). Sure this library is by far not perfect, there is quite some functionality. However, when using the “Get-CiVm” CmdLet you will probably find out quickly […]
The new powershell feature “ordered” hashtable (a new PowerShell feature in v3. See OrderedDictionary Class) becomes an ordinary hashtable when it is imported via Import-CliXml. There is a “active” bug on Microsoft Connect OrderedDictionary becomes Hashtable when exported to and imported from clixml but no action for a couple of months. As a workaround do not use ordered hashtables but […]
Here a few coding considerations that might make you life easer when dealing with PowerShell (but may also hold true for other programming languages): Hide unwanted return information in your code In PowerShell your functions and CmdLets return everything that is output within the function – even if you use an explicit return statement. To avoid unwanted returns from there […]
Microsoft PowerShell allows us to create, read and write performance counters via .NET with ease (check PerformanceCounterCategory in System.Diagnostics). However, there are some gotchas when trying it the first time …
[UPDATE 2014-11-16] The module is now available on NuGet. See below for download link. [UPDATE 2014-10-13] I split the module into separate PS1 files (one per cmdlet/function) and created a manifest for it. Now you can use a prefix and change the name of the cmdlets (the default prefix is ‘Ctera’). Here you find the PowerShell module that you can […]
[UPDATE 2015-12-22] The module is now available on PowerShell Gallery. [UPDATE 2014-11-15] The module is now available on NuGet. This module allows you to have a unified logging in PowerShell and all your scripts. It depends on log4net and thus provides great flexibility on how and where you log. Basic usage is as follows: Main configuration is defined in the […]