Monthly Archives: June 2014

Workflows 6: suspending jobs

One of the great things about work flows is that you can stop and start them. A workflow can be stopped, on a temporary basis, by using the Suspend-Workflow activity. workflow suspend1 {Get-Service Suspend-Workflow Get-Process }suspend1   This will run … Continue reading

Posted in PowerShell V3, PowerShell v4 | Leave a comment

Expanding server names

I had a comment left on my recent post – “Bad practices – making scripts needlessly interactive” asking how to deal with the situation of N servers consecutively numbered e.g. server01 to server05. Taking the script from that post as … Continue reading

Posted in Powershell | Leave a comment

Workflows: 5a CDXML modules update

In my last post I questioned why commands from CDXML didn’t fail as thee weren’t any activities defined for them.  Turns out that functions and other commands that don’t explicitly have their own workflow activities are implicitly wrapped in the … Continue reading

Posted in PowerShell V3, PowerShell v4 | Leave a comment

Workflows: 5 CDXML modules

Last time we saw that you’re not really using cmdlets in PowerShell workflows – you’re using workflow activities. Some cmdlets haven’t been packaged into activities and for those you need to put them in an Inlinescript block.  You can also … Continue reading

Posted in PowerShell V3, PowerShell v4 | 1 Comment

Bad practices – making scripts needlessly interactive

the PowerShell community spends a lot of time talking about best practices when using PowerShell. I’m not convinced this approach is working as we keep seeing the same bad practices coming through on forum questions. I thought I’d turn the … Continue reading

Posted in Powershell Basics | 2 Comments

PowerShell.org – TechSession webinairs

PowerShell.org are starting a series of technical webinairs. Details from http://powershell.org/wp/techsession-webinars/

Posted in Powershell | Leave a comment

Workflows: 4 Using cmdlets

This is a simple function to return some data about a system: function get-serverdata { Get-CimInstance -ClassName Win32_OperatingSystem Get-Service Get-Process } get-serverdata   The function will return the CIM data about the operating system, then the service data and then … Continue reading

Posted in PowerShell V3, PowerShell v4 | Leave a comment