Import-LMDashboard
Syntax
Section titled “Syntax”FilePath-GroupName
Section titled “FilePath-GroupName”Import-LMDashboard -FilePath <string> -ParentGroupName <string> [-ReplaceAPITokensOnImport] [-APIToken <Object>] [-PrivateUserName <string>] [<CommonParameters>]FilePath-GroupId
Section titled “FilePath-GroupId”Import-LMDashboard -FilePath <string> -ParentGroupId <string> [-ReplaceAPITokensOnImport] [-APIToken <Object>] [-PrivateUserName <string>] [<CommonParameters>]File-GroupName
Section titled “File-GroupName”Import-LMDashboard -File <string> -ParentGroupName <string> [-ReplaceAPITokensOnImport] [-APIToken <Object>] [-PrivateUserName <string>] [<CommonParameters>]File-GroupId
Section titled “File-GroupId”Import-LMDashboard -File <string> -ParentGroupId <string> [-ReplaceAPITokensOnImport] [-APIToken <Object>] [-PrivateUserName <string>] [<CommonParameters>]Repo-GroupName
Section titled “Repo-GroupName”Import-LMDashboard -GithubUserRepo <string> -ParentGroupName <string> [-GithubAccessToken <string>] [-ReplaceAPITokensOnImport] [-APIToken <Object>] [-PrivateUserName <string>] [<CommonParameters>]Repo-GroupId
Section titled “Repo-GroupId”Import-LMDashboard -GithubUserRepo <string> -ParentGroupId <string> [-GithubAccessToken <string>] [-ReplaceAPITokensOnImport] [-APIToken <Object>] [-PrivateUserName <string>] [<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”-APIToken
Section titled “-APIToken”The API token to use when replacing tokens in imported dashboards.
Type: System.ObjectDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''Specifies a single JSON dashboard file to import.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: File-GroupName Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: File-GroupId Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-FilePath
Section titled “-FilePath”Specifies the path to a local file or directory containing the JSON dashboard files to import.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: FilePath-GroupName Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: FilePath-GroupId Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-GithubAccessToken
Section titled “-GithubAccessToken”Specifies the GitHub access token for authenticated requests. Required for large repositories due to API rate limits.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Repo-GroupName Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: Repo-GroupId Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-GithubUserRepo
Section titled “-GithubUserRepo”Specifies the GitHub repository (in the format “username/repo”) from which to import JSON dashboard files.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Repo-GroupName Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: Repo-GroupId Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-ParentGroupId
Section titled “-ParentGroupId”The ID of the parent dashboard group where imported dashboards will be placed.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Repo-GroupId Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: File-GroupId Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: FilePath-GroupId Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-ParentGroupName
Section titled “-ParentGroupName”The name of the parent dashboard group where imported dashboards will be placed.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Repo-GroupName Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: File-GroupName Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: FilePath-GroupName Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-PrivateUserName
Section titled “-PrivateUserName”The username of dashboard owner when creating dashboard as private.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-ReplaceAPITokensOnImport
Section titled “-ReplaceAPITokensOnImport”Switch to replace API tokens in imported dashboards with a dynamically generated token.
Type: System.Management.Automation.SwitchParameterDefaultValue: FalseSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''CommonParameters
Section titled “CommonParameters”This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.