Copy-LMDashboard
Syntax
GroupName-Id
Copy-LMDashboard -Name <String> -DashboardId <String> [-Description <String>] [-DashboardTokens <Hashtable>] -ParentGroupName <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
GroupId-Id
Copy-LMDashboard -Name <String> -DashboardId <String> [-Description <String>] [-DashboardTokens <Hashtable>] -ParentGroupId <Int32> [-ProgressAction <ActionPreference>] [<CommonParameters>]
GroupName-Name
Copy-LMDashboard -Name <String> -DashboardName <String> [-Description <String>] [-DashboardTokens <Hashtable>] -ParentGroupName <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
GroupId-Name
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
Copy-LMDashboard -Name "New Dashboard" -DashboardId 12345 -ParentGroupId 67890Copies the dashboard with ID 12345 to a new dashboard named "New Dashboard" in the group with ID 67890.
Example 2
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
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: StringParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept 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: StringParameter Sets: GroupName-Id, GroupId-IdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept 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: StringParameter Sets: GroupName-Name, GroupId-NameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Description
An optional description for the new dashboard.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept 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: HashtableParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept 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: Int32Parameter Sets: GroupId-Id, GroupId-NameAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept 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: StringParameter Sets: GroupName-Id, GroupName-NameAliases:
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
Outputs
Notes
Ensure that you are logged in before running any commands by using the Connect-LMAccount cmdlet.