Freigeben über


MDT 2010 New Feature #21: Copying extra folders

When MDT 2010 replicates content to a linked deployment share, you can choose whether to copy “standard folders” as part of that replication process.  These folders (Scripts, Tools, $OEM$, USMT) might be required by one or more of the task sequences being replicated, so we give you that option.  In the case of media, we always copy these four standard folders; you don’t get a choice as we assume everything in those folders is required by the current deployment share and therefore is also required by the media.

We have periodically received requests to allow for the replication of additional folders to linked deployment shares, as well as the inclusion of additional folders when creating media.  As a result of those requests, we added a mechanism for specifying a list of extra folders.  But there’s one challenge for that:  We didn’t provide a user interface for configuring those, so you have to use PowerShell to do it.  Unfortunately the documentation doesn’t even mention that this is possible, so consider this blog entry a documentation addendum :-)

From a PowerShell session, you would first need to load the MDT PowerShell snap-in (“Add-PSSnapIn Microsoft.BDD.PSSnapIn”) and then connect to the deployment share (simplest way is “Restore-MDTPersistentDrive” to get all the drives connected that you use in the Deployment Workbench).  In the case of linked deployment shares, you can get all the current properties like so:

image

Then setting the ExtraFolders property (which is empty by default) is achieved using “Set-ItemProperty”:

image

Because the ExtraFolders property is a list (array), you always need to specify the values as I did, using the PowerShell syntax of @(“Value1”, “Value2”).  If you only have a single value, it would look like @(“Value1”).

Media works the same way:

image

The folders you specify need to exist at the top level of the deployment share.  In my examples above, my deployment share is “C:\DeploymentShare” so the folders that must exist are “C:\DeploymentShare\MyFolder1” and “C:\DeploymentShare\MyFolder2”.  Make sure you specify folders that actually exist – otherwise you’ll get errors when MDT tries to copy those folders.

After doing this, you’ll notice an additional line in the output, highlighted below, telling you how many extra folders were copied:

image