Export-ManagementPack
Export-ManagementPack
Exports a management pack to a file.
Syntax
Parameter Set: FromManagementPack
Export-ManagementPack [-ManagementPack] <ManagementPack> [-Path] <String> [ <CommonParameters>]
Detailed Description
Exports a management pack to a file. You must provide a reference to the object that represents the management pack to export along with the path to which to export.
Parameters
-ManagementPack<ManagementPack>
Specifies the management pack to export. The value of this parameter is an object that represents the management pack to export. You use the get-ManagementPack cmdlet to retrieve that type of object.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-Path<String>
Specifies the path to the management pack to export.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters
Notes
- For more information, type "Get-Help Export-ManagementPack -detailed". For technical information, type "Get-Help Export-ManagementPack -full".
When specifying multiple values for a parameter, use commas to separate the values. For example, "<parameter-name> <value1>, <value2>".
Examples
-------------- EXAMPLE 1 --------------
This command uses Get-ManagementPack to retrieve all unsealed management packs. It then uses Export-ManagementPack within a loop to export all of the management packs to the root of the C: drive.
C:\PS>$mps = get-managementpack | where-object {$_.Sealed -eq $false}
foreach($mp in $mps)
{
export-managementpack -managementpack $mp -path "C:\"
}