Export-SCSMManagementPack
Export-SCSMManagementPack
Exports a management pack to an .xml file.
Syntax
Parameter Set: Name
Export-SCSMManagementPack [-Name] <String[]> [-Directory] <String> [-ComputerName <String> ] [-Credential <PSCredential> ] [-PassThru] [ <CommonParameters>]
Detailed Description
The Export-SCSMManagementPack cmdlet exports a management pack as a valid XML-formatted file that you can later import into Service Manager. All of the management pack's information is included in the file as XML data. You can use this cmdlet to save or to archive management pack information.
Parameters
-ComputerName<String>
Specifies the name of the computer on which the Service Manager SDK Service is running. The default value is "localhost". The user account that is defined in the Credential parameter must have access rights to the specified computer.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
localhost |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Credential<PSCredential>
Specifies the credentials to use when you connect to the server on which the Service Manager SDK Service is running. The provided user account must have access to that server. The default value for this parameter is the user account of the current context.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Directory<String>
Specifies the folder in which the .xml file of the exported management pack will be stored. This parameter is a mandatory parameter, and the folder that you specify must exist.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ManagementPack<ManagementPack[]>
Specifies the management pack object to export. You can obtain its value by using the Get-SCSMManagementPack cmdlet, or you can pipe a value to the ManagementPack parameter. Either the ManagementPack parameter or the Name parameter (but not both) must be specified.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-Name<String[]>
Specifies the name of the management pack to export. Provide this parameter as a regular expression using the Name property or the DisplayName property of the management pack. Either the ManagementPack parameter or the Name parameter (but not both) must be specified.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-PassThru
Passes an object that represents the ManagementPack object to the pipeline. By default, this cmdlet does not generate any output.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Microsoft.EnterpiseManagement.Configuration.ManagementPack
This is the same management pack object that is returned by Get-SCSMManagementPack.
Outputs
The output type is the type of the objects that the cmdlet emits.
Microsoft.EnterpiseManagement.Configuration.ManagementPack
When you use the PassThru parameter, the Export-SCSMManagementPack cmdlet returns a ManagementPack object.
Examples
-------------------------- EXAMPLE 1 --------------------------
Description
-----------
This command exports all management packs whose Name or DisplayName property contains the "ServiceManager.ConfigurationManagement.Library" string. In this example, the first command in the pipeline uses the Get-SCSMManagementPack cmdlet to get the requested management packs. The pipeline operator then pipes the output of the first command to the second command.
C:\PS>Get-SCSMManagementPack ServiceManager.ConfigurationManagement.Library| Export-SCSMManagementPack -Directory C:\temp;ls C:\temp\*config*Directory: Microsoft.PowerShell.Core\FileSystem::C:\tempMode LastWriteTime Length Name---- ------------- ------ -----a--- 9/1/2009 12:23 AM 176578 ServiceManager.ConfigurationManagement.Library.xml
Related topics
Getting Started with Service Manager Cmdlets for Windows PowerShell