Copy-LMDashboard
Syntax
Section titled “Syntax”GroupName-Id
Section titled “GroupName-Id”Copy-LMDashboard -Name <String> -DashboardId <String> [-Description <String>] [-DashboardTokens <Hashtable>] -ParentGroupName <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]GroupId-Id
Section titled “GroupId-Id”Copy-LMDashboard -Name <String> -DashboardId <String> [-Description <String>] [-DashboardTokens <Hashtable>] -ParentGroupId <Int32> [-ProgressAction <ActionPreference>] [<CommonParameters>]GroupName-Name
Section titled “GroupName-Name”Copy-LMDashboard -Name <String> -DashboardName <String> [-Description <String>] [-DashboardTokens <Hashtable>] -ParentGroupName <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]GroupId-Name
Section titled “GroupId-Name”Copy-LMDashboard -Name <String> -DashboardName <String> [-Description <String>] [-DashboardTokens <Hashtable>] -ParentGroupId <Int32> [-ProgressAction <ActionPreference>] [<CommonParameters>]Description
Section titled “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
Section titled “Examples”Example 1
Section titled “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
Section titled “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
Section titled “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
Section titled “Parameters”The name of the new dashboard.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-DashboardId
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-ProgressAction”Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “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
Section titled “Inputs”Outputs
Section titled “Outputs”Ensure that you are logged in before running any commands by using the Connect-LMAccount cmdlet.