Skip to content

Copy-LMDashboard

Syntax

GroupName-Id

Terminal window
Copy-LMDashboard -Name <String> -DashboardId <String> [-Description <String>] [-DashboardTokens <Hashtable>]
-ParentGroupName <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]

GroupId-Id

Terminal window
Copy-LMDashboard -Name <String> -DashboardId <String> [-Description <String>] [-DashboardTokens <Hashtable>]
-ParentGroupId <Int32> [-ProgressAction <ActionPreference>] [<CommonParameters>]

GroupName-Name

Terminal window
Copy-LMDashboard -Name <String> -DashboardName <String> [-Description <String>] [-DashboardTokens <Hashtable>]
-ParentGroupName <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]

GroupId-Name

Terminal window
Copy-LMDashboard -Name <String> -DashboardName <String> [-Description <String>] [-DashboardTokens <Hashtable>]
-ParentGroupId <Int32> [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

The Copy-LMDashboard function allows you to copy a LogicMonitor dashboard to a new dashboard. You can specify the name, ID, or group name of the dashboard to be copied, as well as provide a new name and optional description for the copied dashboard. The function requires valid API credentials and a logged-in session.

Examples

Example 1

Terminal window
Copy-LMDashboard -Name "New Dashboard" -DashboardId 12345 -ParentGroupId 67890
Copies the dashboard with ID 12345 to a new dashboard named "New Dashboard" in the group with ID 67890.

Example 2

Terminal window
Copy-LMDashboard -Name "New Dashboard" -DashboardName "Old Dashboard" -ParentGroupName "Group A"
Copies the dashboard named "Old Dashboard" to a new dashboard named "New Dashboard" in the group named "Group A".

Example 3

Terminal window
Copy-LMDashboard -Name "New Dashboard" -DashboardName "Old Dashboard" -ParentGroupName "Group A" -DashboardTokens @{ "defaultResourceName" = "Value1"; "defaultResourceGroup" = "Value2" }
Copies the dashboard named "Old Dashboard" to a new dashboard named "New Dashboard" in the group named "Group A", replacing the tokens "defaultResourceName" with "Value1" and "defaultResourceGroup" with "Value2".

Parameters

-Name

The name of the new dashboard.

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

-DashboardId

The ID of the dashboard to be copied. This parameter is mandatory when using the ‘GroupId-Id’ or ‘GroupName-Id’ parameter sets.

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

-DashboardName

The name of the dashboard to be copied. This parameter is mandatory when using the ‘GroupId-Name’ or ‘GroupName-Name’ parameter sets.

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

-Description

An optional description for the new dashboard.

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

-DashboardTokens

A hashtable of tokens to be replaced in the dashboard. The key is the token name and the value is the new value. If not provided, the tokens from the source dashboard will be used.

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

-ParentGroupId

The ID of the parent group for the new dashboard. This parameter is mandatory when using the ‘GroupId-Id’ or ‘GroupId-Name’ parameter sets.

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

-ParentGroupName

The name of the parent group for the new dashboard. This parameter is mandatory when using the ‘GroupName-Id’ or ‘GroupName-Name’ parameter sets.

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

-ProgressAction

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

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

Outputs

Notes

Ensure that you are logged in before running any commands by using the Connect-LMAccount cmdlet.