Skip to content

New-LMServiceGroup

Terminal window
New-LMServiceGroup -Name <String> [-Description <String>] [-Properties <Hashtable>]
[-DisableAlerting <Boolean>] -ParentGroupId <Int32> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
[<CommonParameters>]
Terminal window
New-LMServiceGroup -Name <String> [-Description <String>] [-Properties <Hashtable>]
[-DisableAlerting <Boolean>] -ParentGroupName <String> [-ProgressAction <ActionPreference>] [-WhatIf]
[-Confirm] [<CommonParameters>]

The New-LMServiceGroup function creates a new LogicMonitor Service group with the specified parameters.

Terminal window
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.

Terminal window
New-LMServiceGroup -Name "ChildServiceGroup" -ParentGroupName "ParentServiceGroup"

This example creates a new LogicMonitor Service group named “ChildServiceGroup” with a specified parent Service group.

The name of the Service group. This parameter is mandatory.

Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The description of the Service group.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

A hashtable of custom properties for the Service group.

Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Specifies whether alerting is disabled for the Service group. The default value is $false.

Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

The ID of the parent Service group. This parameter is mandatory when using the ‘GroupId’ parameter set.

Type: Int32
Parameter Sets: GroupId
Aliases:
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

The name of the parent Service group. This parameter is mandatory when using the ‘GroupName’ parameter set.

Type: String
Parameter Sets: GroupName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Fill ProgressAction Description

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

None. You cannot pipe objects to this command.

Section titled “None. You cannot pipe objects to this command.”

This function requires a valid LogicMonitor API authentication. Use Connect-LMAccount to authenticate before running this command.