Repository navigation
New MPToolApplicationComponentClass
AndreasSobczyk edited this page Nov 18, 2016
·
1 revision
#New-MPToolApplicationComponentClass Creates a new class from the base class Microsoft.Windows.ApplicationComponent. Adds the needed references for the base class automatically. Returns object of type [Microsoft.EnterpriseManagement.Configuration.ManagementPackClass]
###Parameters
- ManagementServerFQDN [string] – FQDN of the management server to connect.
- ManagementPackName [string] – Name of the management pack.
- ClassName [string] – Name of the new class.
- ClassDisplayName [string] – (Optional) Display name of the new class.
- ClassDescription [string] – (Optional) Description of the new class.
-
ClassKeyProperties [array] – (Optional) Array of key properties for the new class. Usually only one key property.
Example - @("KeyProp") -
ClassNonKeyProperties [array] – (Optional) Array of non-key properties for the new class.
Example - @("Prop1","Prop2") - IsAbstract [boolean] – (Optional) Abstract setting for the class $true / $false. Default is $false
- IsHosted [boolean] – (Optional) Hosted setting for the class $true / $false. Default is $false
- IsSingleton [boolean] – (Optional) Singleton setting for the class $true / $false. Default is $false
###Example Creates a new abstract class named "Contoso.NewClass", with one key property "KeyProp" and two non-key properties "Prop1" and "Prop2", in the management pack "Contoso.Monitoring"
New-MPToolApplicationComponentClass -ManagementServerFQDN scom01.contoso.com `
-ManagementPackName "Contoso.Monitoring" `
-ClassName "Contoso.NewClass" `
-ClassDisplayName "Contoso NewClass" `
-ClassDescription "Class to Contoso.NewClass" `
-ClassKeyProperties @("KeyProp") `
-ClassNonKeyProperties @("Prop1","Prop2") `
-IsAbstract $true -IsHosted $false -IsSingleton $false-
Management Pack cmdlets
- New-MPToolManagementPackAlias
- Get-MPToolManagementPackReferenceAlias
- New-MPToolManagementPack
- New-MPToolOverrideManagementPack
- Add-MPToolManagementPackReference
- Classes
- New-MPToolApplicationComponentClass
- New-MPToolComputerRoleClass
- New-MPToolLocalApplicationClass
- New-MPToolClass
- Discoveries
- Monitors
- Rules
- Relationships