Import-LMDashboard
Syntax
Section titled “Syntax”FilePath-GroupName
Section titled “FilePath-GroupName”Import-LMDashboard -FilePath <String> -ParentGroupName <String> [-ReplaceAPITokensOnImport] [-APIToken <Object>] [-PrivateUserName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]FilePath-GroupId
Section titled “FilePath-GroupId”Import-LMDashboard -FilePath <String> -ParentGroupId <String> [-ReplaceAPITokensOnImport] [-APIToken <Object>] [-PrivateUserName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]File-GroupName
Section titled “File-GroupName”Import-LMDashboard -File <String> -ParentGroupName <String> [-ReplaceAPITokensOnImport] [-APIToken <Object>] [-PrivateUserName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]File-GroupId
Section titled “File-GroupId”Import-LMDashboard -File <String> -ParentGroupId <String> [-ReplaceAPITokensOnImport] [-APIToken <Object>] [-PrivateUserName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]Repo-GroupName
Section titled “Repo-GroupName”Import-LMDashboard -GithubUserRepo <String> [-GithubAccessToken <String>] -ParentGroupName <String> [-ReplaceAPITokensOnImport] [-APIToken <Object>] [-PrivateUserName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]Repo-GroupId
Section titled “Repo-GroupId”Import-LMDashboard -GithubUserRepo <String> [-GithubAccessToken <String>] -ParentGroupId <String> [-ReplaceAPITokensOnImport] [-APIToken <Object>] [-PrivateUserName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]Description
Section titled “Description”The Import-LMDashboard function allows you to import LogicMonitor dashboards from different sources, such as local files, GitHub repositories, or LogicMonitor dashboard groups. It supports importing dashboards in JSON format.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”#Import dashboards from a directoryImport-LMDashboard -FilePath "C:\Dashboards" -ParentGroupId 12345 -ReplaceAPITokensOnImport -APIToken $apiTokenExample 2
Section titled “Example 2”#Import dashboards from GitHubImport-LMDashboard -GithubUserRepo "username/repo" -ParentGroupName "MyDashboards" -ReplaceAPITokensOnImport -APIToken $apiTokenParameters
Section titled “Parameters”-FilePath
Section titled “-FilePath”Specifies the path to a local file or directory containing the JSON dashboard files to import.
Type: StringParameter Sets: FilePath-GroupName, FilePath-GroupIdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseSpecifies a single JSON dashboard file to import.
Type: StringParameter Sets: File-GroupName, File-GroupIdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-GithubUserRepo
Section titled “-GithubUserRepo”Specifies the GitHub repository (in the format “username/repo”) from which to import JSON dashboard files.
Type: StringParameter Sets: Repo-GroupName, Repo-GroupIdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-GithubAccessToken
Section titled “-GithubAccessToken”Specifies the GitHub access token for authenticated requests. Required for large repositories due to API rate limits.
Type: StringParameter Sets: Repo-GroupName, Repo-GroupIdAliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-ParentGroupId
Section titled “-ParentGroupId”The ID of the parent dashboard group where imported dashboards will be placed.
Type: StringParameter Sets: FilePath-GroupId, File-GroupId, Repo-GroupIdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-ParentGroupName
Section titled “-ParentGroupName”The name of the parent dashboard group where imported dashboards will be placed.
Type: StringParameter Sets: FilePath-GroupName, File-GroupName, Repo-GroupNameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-ReplaceAPITokensOnImport
Section titled “-ReplaceAPITokensOnImport”Switch to replace API tokens in imported dashboards with a dynamically generated token.
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-APIToken
Section titled “-APIToken”The API token to use when replacing tokens in imported dashboards.
Type: ObjectParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-PrivateUserName
Section titled “-PrivateUserName”The username of dashboard owner when creating dashboard as private.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 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”None. You cannot pipe objects to this command.
Section titled “None. You cannot pipe objects to this command.”Outputs
Section titled “Outputs”Returns imported dashboard objects.
Section titled “Returns imported dashboard objects.”You must run Connect-LMAccount before running this command.