PowerShell Remoting Insanity with AppAssure and the Invoke-Command Cmdlet

Although simple, I thought I would share the following PowerShell script since it’s neat due to the fact that it uses the PowerShell remoting Invoke-Command cmdlet to retrieve a list of server names that are protected by an AppAssure Core server where the status is not protected, then it uses the output of that portion of the script (Nesting in parenthesis) as the input for the ComputerName parameter of the outer portion of the script which uses another Invoke-Command to attempt to start the AppAssureAgent service on those servers that were returned by the nested portion of the script:


AppAssure version 5.3.1 or higher is required on the AppAssure Core server for PowerShell support. I’ve used the simplified PowerShell version 3 Where-Object syntax in this script since the AppAssure Core server is running PowerShell version 3 .


About Mike F Robbins

Mike F Robbins is a Microsoft MVP on Windows PowerShell and a SAPIEN Technologies MVP. He is a co-author of Windows PowerShell TFM 4th Edition and is a contributing author of a chapter in the PowerShell Deep Dives book. Mike has written guest blog articles for the Hey, Scripting Guy! Blog, PowerShell Magazine, and PowerShell.org. He is the winner of the advanced category in the 2013 PowerShell Scripting Games. Mike is also the leader and co-founder of the Mississippi PowerShell User Group. He blogs at mikefrobbins.com and can be found on twitter @mikefrobbins.
This entry was posted in AppAssure, PowerShell and tagged , . Bookmark the permalink.

2 Responses to PowerShell Remoting Insanity with AppAssure and the Invoke-Command Cmdlet

  1. Andy C says:

    I found this very awesome. Is there anyway you could make more full plug-and-play scripts for 5.3.1? I have put down my contact e-mail for further discussion. I love Powershell.

  2. Robin says:

    Been trying to write a script that archives the back up of to local disk after each snap ,

    Only snapping once a day and want to export it to a USB hard drive ,

    Do you have any advice on how to script this ?

Leave a Reply