In the last few weeks I had to create several GitHub repositories for my daily work. To simplify the process I automated the creation with PowerShell. I created and initialized the repositories manually until I recognized that this is a perfect task to automate. First I studied the documentation of the GitHub API v3, which is very well documented! Fortunately […]
You might have heard of the recently added support for PowerShell development inside Visual Studio. This extension provides several features, with support for the Pester testing framework being one of them. However, it seems that sometimes the Visual Studio 2013 just does not recognise your test scripts (even when they are named like SomeScript.Tests.ps1). As a quick workaround you can […]
Import-CliXml is a rather convenient way to import (configuration) data from serialized XML files which then can be easily processed as hashtables. But unfortunately, there seem to be some subtle […]
Hi, this is Marc Rufer from d-fens GmbH. I started working at d-fens as a Software Engineer this week. I already wrote some posts and I’ll continue sharing information about […]
Recently I needed to check if a function was defined inside a script file. Reflection was my first thought, and PowerShell being a first class .NET citizen should be able to perform this. But as PowerShell is defined as an Abstract Syntax Tree (AST) it is even easier to achieve this. Inside the AST every block (BEGIN, PROCESS, END) is […]
There are several ways on how to create a PowerShell (script) module. And depending on your environment chances are high you are not the only developer contributing to a module. […]
Some time ago I mentioned an error and a possible workaround when using PowerShell with the Clickatell SOAP interface. As Clickatell now provides a REST based interface I thought it is time to quickly show you how to use this API instead. Description When sending SMS you certainly first have to enable the REST API in your developer central account. […]
Recently I was testing Graylog2 as a store for metering data and had to bulk-load a larger amount of data into its database. My goal was to create synthetic and […]
Linked clone VirtualMachines share their base disks with their parent virtual machine. Only changes (delta) are stored in the childs virtual disks. These results in two major benefits: Fast Provisioning time Space savings However, linked clones have some limitations: Diskspace cannot be adjusted Performance impact – Depending on storage cache The following PowerCLI snippets will promote all virtual disks […]
Today I had to pass a long list of parameters to a Cmdlet inside a PowerShell job. At first it looked like this, which seemed rather horrbile (i.e. unreadable) to me. There had to be a cleaner approach to this – and so it was … there are some samples around the Internet on how to use the Start-Job Cmdlet […]
GENERAL This Microsoft PowerShell module contains Cmdlets to perform various base actions and utility/convenience functions against the Infoblox REST API (WAPI). You can download this module via GitHub at biz.dfch.PS.Ipam.Infoblox.Api or via NuGet with Install-Package biz.dfch.PS.Ipam.Infoblox.Api. DESCRIPTION This module uses Invoke-RestMethod internally. You can also use the functionality of the provided InfobloxApi.dll assembly that is more efficient. The current implementation […]
PowerShell makes it really easy to convert JSON into (PSCustom) objects with the means of ConvertFrom-Json. But manually verifying every property after conversion is particular tedious and annoying work. Recently I wrote about Using typeful JSON Deserialisation and Validation in PowerShell. However, sometimes this is just not feasible as you might not have a C# class describing your data. Scripting […]
Hi, this is Daniel and this is my first post about a small gotcha you might experience with VMware vCloud Director and the surprising resumé that there is no automated solution for fixing that. Since vCloud Director 5.1 it is possible to enable your organization to use an SAML Identity provider. And even if you don’t use it, vCloud Director […]
As announced a couple of days ago we started pushing some of our PowerShell modules to GitHub and NuGet. And soon it became obvious that keeping all the scripts, signatures, versions and packages in sync was some tedious and error-prone work. This should definitely be automated, you might instantly think – and right you are! So here are some small […]
[Note] This is a rather old article from 2014. The world and PowerShell have changed. For an even easier way than presented here see the comment at the bottom of the article. In this post I present a quick refresher on how to make C# extension methods available to objects and classes in PowerShell sessions. C# allows you to extend […]
This is Microsoft PowerShell module is part of our Apache 2.0 based open source automation framework “Cumulus”. You will find all related posts via the “Cumulus” tag. You can use this module to perform operations against VMware vCenter infrastructure (the module makes use and abstracts VMware’s supplied PowerShell PowerCLI snapin). You can download the module on GitHub or on NuGet […]