Share via


Test-SCOMManagementPack

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Test-SCOMManagementPack

Tests the validity of a management pack.

Syntax

Parameter Set: Default
Test-SCOMManagementPack [-ComputerName <String> ] [-Credential <PSCredential> ] [-FullName <String> ] [-SCSession <Connection> ] [ <CommonParameters>]

Detailed Description

The Test-SCOMManagementPack cmdlet tests the validity of a management pack. This cmdlet replaces the MPVerify.exe utility which verifies a management pack via the SDK method ManagementPack.Verify(). This cmdlet requires that the user specifies the path to the management pack file, and the name of the computer to use for resolving dependencies. For management pack bundle files (.mpb), all the management packs in the bundle will be tested for validity.
All issues found during the test are written as non-terminating errors, one error per issue. The output of the cmdlet is a PSCustom object consisting of the management pack name, the path of the management pack and a property named "Verified" which equals 'true' if no errors are found, and 'false' if errors were found.

Parameters

-ComputerName<String>

Specifies the name of a computer to establish a connection with. The computer must be running the System Center Data Access Service. The default value is the computer for the current management group connection. Valid formats include a NetBIOS name, an IP address, or a fully qualified domain name. To specify the local computer, type the computer name, "localhost", or a dot (.).

Aliases

none

Required?

false

Position?

named

Default Value

localhost

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies a user account under which the management group connection will run, that must have access to the server identifed by the ComputerName parameter (if specified). Default value is the current user. You can enter a PSCredential object that is returned by the Get-Credential cmdlet.

Aliases

none

Required?

false

Position?

named

Default Value

Current user context

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FullName<String>

Specifies the full name and path of the management pack XML file.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SCSession<Connection>

Specifies a connection to a management server. Default value is the current management group connection.

You can enter a management group connection object that is returned by the Get-SCOMManagementGroupConnection or the Get- SCOMManagementGroupConnection cmdlet.

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.

  • System.IO.FileInfo object

    The cmdlet parameter FullName which takes value by propertyname enables the cmdlet to take output from Get-ChildItem, or any other producer of System.IO.FileInfo objects.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.EnterpiseManagement.Configuration.ManagementPack

    An object that represents a management pack, this object includes the following deployment information:
    DeploymentStatus - property - The deployment status of a management pack
    DeploymentStatusTime - property - the timestamp of the last status change
    DeployManagementPack - method - call the deployment task for the management pack.

Examples

-------------------------- EXAMPLE 1 --------------------------

The commands in this example test a management pack for validity.

PS C:\>PS C:\>Test-SCOMManagementPack C:\temp\Woodgrove.MP.xml
Test-SCOMManagementPack : XSD verification failed for management pack. [Line: 15, Position: 6]
At line:1 char:19
+ Test-SCOMManagementPack <<<< C:\temp\Woodgrove.MP.xml

Import-SCOMManagementPack

New-SCOMManagementPackBundle

Export-SCOMManagementPack

Get-SCOMManagementPack

New-SCOMManagementPack

Protect-SCOMManagementPack

Remove-SCOMManagementPack