Import-SCOMManagementPack
Import-SCOMManagementPack
Imports management packs.
Syntax
Parameter Set: FromManagementPackFile
Import-SCOMManagementPack [-Fullname] <String[]> [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: __AllParameterSets
Import-SCOMManagementPack [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-PassThru] [-SCSession <Connection[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: FromManagementPack
Import-SCOMManagementPack [-ManagementPack] <ManagementPack[]> [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Import-SCOMManagementPack cmdlet imports System Center 2012 – Operations Manager management packs. You can export a management pack to an XML-formatted file by using the Export-SCOMManagementPack cmdlet.
Before the cmdlet imports a management pack, System Center 2012 – Operations Manager attempts to validate the management pack. If the management pack contains invalid XML, the cmdlet does not import the management pack and raises an error.
By default, this cmdlet uses the active persistent connection to a management group. Use the SCSession parameter to specify a different persistent connection. You can create a temporary connection to a management group by using the ComputerName and Credential parameters. For more information, type Get-Help about_OpsMgr_Connections
.
Parameters
-ComputerName<String[]>
Specifies an array of names of computers. The cmdlet establishes temporary connections with management groups for these computers. You can use NetBIOS names, IP addresses, or fully qualified domain names (FQDNs). To specify the local computer, type the computer name, localhost, or a dot (.).
The System Center Data Access service must be running on the computer. If you do not specify a computer, the cmdlet uses the computer for the current management group connection.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
localhost |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Credential<PSCredential>
Specifies a PSCredential object for the management group connection. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential
.
If you specify a computer in the ComputerName parameter, use an account that has access to that computer. The default is the current user.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
User account of the current context. |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Fullname<String[]>
Specifies an array of full paths and file names of management packs to import. Include management packs (*.xml, *.mp) or management pack bundles (*.mpb). If you specify a management pack bundle, the cmdlet imports all management packs from that bundle.
If you specify multiple management packs, the cmdlet imports them in the order that satisfies management pack dependencies. As a result, the cmdlet may import management packs in a different order from the one you specify.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
-ManagementPack<ManagementPack[]>
Specifies an array of ManagementPack objects. To obtain a ManagementPack object, use the Get-SCOMManagementPack cmdlet.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-PassThru
Returns an object representing the item with which you are working. 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 |
-SCSession<Connection[]>
Specifies an array of Connection objects. To obtain a Connection object, use the Get-SCOMManagementGroupConnection cmdlet.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Microsoft.EnterpriseManagement.Configuration.ManagementPack
You can pipe a management pack object to the ManagementPack parameter of this cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Microsoft.EnterpriseManagement.Configuration.ManagementPack
When you specify the PassThru parameter, this cmdlet returns an object that represents the management pack.
Examples
Example 1: Import a management pack from a file
This command imports the management pack file C:\MPArchive\MPWesternOffice.xml.
PS C:\> Import-SCOMManagementPack -Fullname "C:\MPArchive\MPWesternOffice.xml"
Example 2: Import a management pack from a management pack bundle
This command imports only the Woodgrove.ManagementPack management pack that is included in the C:\MPArchive\MPWesternOfficeBundle.mpb management pack bundle file.
PS C:\> Import-SCOMManagementPack -Fullname "C:\MPArchive\MPWesternOfficeBundle.mpb" -Name Woodgrove.ManagementPack