New-LMServiceGroup
Syntax
GroupId
New-LMServiceGroup -Name <String> [-Description <String>] [-Properties <Hashtable>] [-DisableAlerting <Boolean>] -ParentGroupId <Int32> [-ProgressAction <ActionPreference>] [<CommonParameters>]
GroupName
New-LMServiceGroup -Name <String> [-Description <String>] [-Properties <Hashtable>] [-DisableAlerting <Boolean>] -ParentGroupName <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Description
The New-LMServiceGroup function creates a new LogicMonitor Service group with the specified parameters.
Examples
Example 1
New-LMServiceGroup -Name "MyServiceGroup" -Description "This is a test Service group" -Properties @{ "Location" = "US"; "Environment" = "Production" }
This example creates a new LogicMonitor Service group named “MyServiceGroup” with a description and custom properties.
Example 2
New-LMServiceGroup -Name "ChildServiceGroup" -ParentGroupName "ParentServiceGroup"
This example creates a new LogicMonitor Service group named “ChildServiceGroup” with a specified parent Service group.
Parameters
-Name
The name of the Service group. This parameter is mandatory.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Description
The description of the Service group.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Properties
A hashtable of custom properties for the Service group.
Type: HashtableParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DisableAlerting
Specifies whether alerting is disabled for the Service group. The default value is $false.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False
-ParentGroupId
The ID of the parent Service group. This parameter is mandatory when using the ‘GroupId’ parameter set.
Type: Int32Parameter Sets: GroupIdAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-ParentGroupName
The name of the parent Service group. This parameter is mandatory when using the ‘GroupName’ parameter set.
Type: StringParameter Sets: GroupNameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-ProgressAction
Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
None. You cannot pipe objects to this command.
Outputs
Returns LogicMonitor.DeviceGroup object.
Notes
This function requires a valid LogicMonitor API authentication. Use Connect-LMAccount to authenticate before running this command.