System Center Orchestrator 2012 : Copy Folder activity

Hi All,

As you probably notice, in the default activities available with Microsoft System Center Orchestrator 2012 Beta, there is no Copy Folder activity.
image

Someone asked why during one of the Community Evaluation Program meetings and the answer was quite simple : “RoboCopy could easily take care of this task”. Here we go, I will show you how to simply use Robocopy in a System Center Orchestrator 2012 Runbook.

Today scenario will be a content copy of the folder C:SCOFolderSource (including files / sub-folders)

image

into another folder C:SCOFolderDestination.

For that we will use the command Robocopy and two default Orchestrator activities, the Initialize Data and the Run Program.
image

Once done, we will create two new variables, one for our Source folder and the other for our Destination Folder.
image

Back to our Runbook, we could go directly in the properties of the Run Command activity.
image

  • Mode : we choose Command execution.
  • Details > Computer : I chose to run the command by the Orchestrator server, so right click in the Computer Field, choose Returned Data, check the box Show common Returned Data and select Runbook Server Name.
    image
  • Details > Command : Robocopy is built-in in Windows 2008, so we could call it directly. If you are running Windows Server 2003, you will have to download it and to specify the path in the command field.

After calling robocopy, we specify the two variables (FolderSource and FolderDestination) that we defined earlier, and finally we specify the parameters : /E /COPYALL /TS /FP

imageimage

All the details about the parameters could be found here : http://technet.microsoft.com/en-us/library/cc733145(WS.10).aspx

Our Copy Folder Runbook is now ready to run. Just press on the Run button and check the log history :
image

A little look in our destination folder, we could see that all the content has been well copied.
image

Of course this is a really simple activity, now you could re-use it in any of your existing Runbooks.

This Runbook is available here : DOWNLOAD

Microsoft System Center Orchestrator 2012 Resources :
Microsoft System Center Orchestrator 2012 beta is available as public beta at the Microsoft Download Center : http://www.microsoft.com/download/en/details.aspx?id=26503

Microsoft System Center Orchestrator 2012 Team Blog : http://blogs.technet.com/b/scorch/

TechNet Forums for System Center Cross Platform and Interoperability :http://social.technet.microsoft.com/Forums/en-US/category/scinterop

Cheers
Christopher KEYAERT
http://twitter.com/keyaertc

Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+Email this to someoneShare on TumblrPin on PinterestDigg thisShare on RedditFlattr the authorBuffer this pageShare on StumbleUpon

About Christopher Keyaert

Christopher Keyaert is a Consultant, focused on helping partners to leverage the System Center and Microsoft Azure cloud platform. He is also a Microsoft Most Valuable Professional (MVP) for Cloud and Data Center Management and a Microsoft Certified Trainer (MCT).
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

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