New MPToolHostingRelationship - AndreasSobczyk/MPTool GitHub Wiki

#New-MPToolHostingRelationship Creates new hosting relationship between two classes. This will also turn the target class into a hosted class. Returns object of type [Microsoft.EnterpriseManagement.Configuration.ManagementPackRelationship]

###Parameters

  • ManagementServerFQDN [string] – FQDN of the management server to connect.
    Example – "scom01.contoso.com"
  • ManagementPackName [string] – Name of the management pack.
    Example – "Contoso.Application.Discovery"
  • RelationshipName [string] – Name of the relationship.
    Example – "Contoso.Application.WebsiteHostsComponent"
  • SourceClassName [string] – Name of the source class.
    Example – "Contoso.Application.Website"
  • SourceEndpointName [string] – (Optional) Name of the source endpoint on relationship. Default: ""Source"
    Example – "Website"
  • sourceClassMPName [string] – (Optional) Name of the source class management pack.
    Example – "Contoso.Application.Discovery"
  • sourceClassMPAlias [string] – (Optional) Alias for the source class management pack.
    Example – ContosoAppDiscovery
  • TargetClassName [string] – Name of the target class.
    Example – "Contoso.Application.Website.Component"
  • TargetEndpointName [string] – (Optional) Name of the target endpoint on relationship. Default: "Target"
    Example – "Component"
  • TargetClassMPName [string] – (Optional) Name of the source class management pack.
    Example – "Contoso.Application.Discovery"
  • TargetClassMPAlias [string] –(Optional) Alias for the source class management pack.
    Example – ContosoAppDiscovery
  • IsAbstract [boolean] – (Optional) Abstract setting for relationship $true/$false. Default: $false

###Example Creates a hosting relationship between source class Contoso.Application.Website and target class Contoso.Application.Website.Component called Contoso.Application.WebsiteHostsComponent in the management pack Contoso.Application.Discovery.

New-MPToolHostingRelationship -ManagementServerFQDN "scom01.contoso.com" `
-ManagementPackName "Contoso.Application.Discovery" `
-RelationshipName "Contoso.Application.WebsiteHostsComponent" `
-SourceClassName "Contoso.Application.Website" `
-TargetClassName "Contoso.Application.Website.Component"