Automating Software Automation

Yet another Chocolatey/PowerShell post!
Sorry, I rarely have time to put my thoughts to words – so I take any chance – and lately I’ve been thinking about software automation on Windows a lot! The possibilities seem quite overwhelming, and I like this alot! 😉

Chocolatey++

Tools like Chocolatey are even more fun when using in scripted and automated environments. I’ve set up some Jenkins-Tasks that allow me to internalize packages (= packages that are available offline, without the need to pull anything from the interwebs), synchronize packages between servers (keeping remote package mirrors up-to-date) and so on.

You can find a selection of those scripts on my GitHub page: mwallner/SoftwareAutomation/Chocolatey/Jenkins

PowerShell++ / ‘Invoke-Remote’

I find myself using PowerShell on Windows more and more the way I am using bash on my beloved Linux environments – using Remote-Sessions

On Windows you can use Enter-PSSession to spin up a PowerShell session on a remote host – and basically do whatever the heck you want to do – if you’re not familiar with Boxstarter you’ve missed something – go get it!

I’ve started a little side-project called Invoke-Remote that tries to add some sugar to both the standard Invoke-Command, as well as Boxstarter.

You can find the first draft here: mwallner/Invoke-Remote

 Import-Module .\InvokeRemote\Invoke-Remote.psm1 -Verbose
VERBOSE: Importing function ‘Install-ChocolateyRemote’
VERBOSE: Importing function ‘Invoke-Remote’.
VERBOSE: Importing alias ‘ir’.
Invoke-Remote mwmaster “‘FooBar'”,{Write-Output “This is $(hostname)”}
wsmid : http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd
ProtocolVersion : http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd
ProductVendor : Microsoft Corporation
ProductVersion : OS: 0.0.0 SP: 0.0 Stack: 3.0
Key : commands_in
Value : {‘FooBar’, Write-Output “This is $(hostname)”}
Name : commands_in
Key : commands_out
Value : {FooBar, This is MWMASTER}
Name : commands_out
Key : scripts_in
Value :
Name : scripts_in

Leave a Reply

Your email address will not be published. Required fields are marked *