en-US/about_PSCMContentMgmt_ExportImport.help.txt
TOPIC
about_PSCMContentMgmt_ExportImport SHORT DESCRIPTION An overview of the functions in PSCMContentMgmt used for managing distribution point .pkgx files. LONG DESCRIPTION Being able to quickly and easily export distribution point content to .pkgx files can help you in several ways. For example, it may be an ideal solution to migrating content from one distribution point to another when comissioning a new server. Ideally, a pull distribution point would be configured for this sort of task. However these functions offer you an alternative method if you are unable to use pull distribution points. Another example is that you could easily export your distribution point content to .pkgx for disaster recovery or troubleshooting needs. CONTENT LIBRARY MIRATION This section will help you use PSCMContentMgmt to migrate your distribution point's content library to another distribution point. 1. Begin by exporting your old/source distribution point's content using Export-DPContent. Preferably this server will be on the same LAN as the distribution point you intend to import the .pkgx files to. If the server is remote across a slow link, it is recommended you copy the .pkgx files generated by Export-DPContent to your new/target distribution point. For example: Get-DPContent -DistributionPoint "OldDP.contoso.com" | Export-DPContent -Folder "E:\exported" 2. Configure your new/target distribution point to allow prestaged content using Set-DPAllowPrestagedContent. This will ensure when we use Start-DPContentDistribution in the next step that the content will not inadvertently transfer across an undesired route. For example: Set-DPAllowPrestagedContent -DistributionPoint "NewDP.contoso.com" 3. Distribute the exported content from step 1 using Start-DPContentDistribution using its -Folder parameter. This will walk through all .pkgx files in the given folder, identifying each object by the particular naming convention of the .pkgx files generated by Export-DPContent, and distribute each of the objects they represent in console to your new/target distribution point. This will put the content objects in console in a "Pending" state; waiting to be imported on your new/target distribution point. For example: Start-DPContentDistribution -Folder "E:\exported" -DistributionPoint "NewDP.contoso.com" 4. Log on locally or enter a PowerShell session to your new/target distribution point and import PSCMContentMgmt. This step must be executed locally to your new/target distribution point. This is because Import-DPContent simply invokes ExtractContent.exe. Use Import-DPContent and the -Folder parameter (which is preferably a local drive path, or a UNC path where the host is on the same LAN) to begin importing content. Similar to step 3, Import-DPContent depends on the particular naming convention of .pkgx files generated by Export-DPContent to successfully import the content. For example: Import-DPContent -Folder "\\OldDP.contoso.com\e$\exported" 5. Unconfigure your new/target distribution point to only allow prestaged content. For example: Set-DPAllowPrestagedContent -DistributionPoint "NewDP.contoso.com" -State $false COMMANDS * Export-DPContent Exports a distribution point's content to .pkgx in a given folder. This function requires the Configuration Manager module to be available locally. At the time of writing this, there's no other way to get the module other than installing the Configuration Manager console. While you could run this remotely from the distribution point of which you want to export content from, it's likely you actually want to run it localhost to the distribution point and save the content either locally or on another system nearby. * Import-DPContent Imports previously exported content (.pkgx files). This function requires the Configuration Manager module to be available locally. At the time of writing this, there's no other way to get the module other than installing the Configuration Manager console. Unlike Export-DPContent, this cannot be executed remotely. This must be ran localhost to the distribution point of which you intend to import content to. This is because is invokes ExtractContent.exe to unpack the .pkgx files and import the decompressed content directly in to the content library. Since this function invokes ExtractContent.exe, the calling shell or script must be elevated. This is a requirement for ExtractedContent.exe. * Set-DPAllowPrestagedContent A simple wrapper to configure a distribution point to only accept content from prestaged (.pkgx) files. This is the same as the check box "Enable this distribution point for prestaged content" in a distribution point's properties within console. If you are cautious about sending content across the WAN from your site server's content library, this is an important step when intending to use Import-DPContent after Start-DPContentDistribution. |