New-AzPortalDashboard

Creates or updates a Dashboard.

Note

This is the previous version of our documentation. Please consult the most recent version for up-to-date information.

Syntax

New-AzPortalDashboard
   -Name <String>
   -ResourceGroupName <String>
   -Location <String>
   [-SubscriptionId <String>]
   [-Lens <Hashtable>]
   [-Metadata <Hashtable>]
   [-Tag <Hashtable>]
   [-DefaultProfile <PSObject>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
New-AzPortalDashboard
   -Name <String>
   -ResourceGroupName <String>
   -Dashboard <IDashboard>
   [-SubscriptionId <String>]
   [-DefaultProfile <PSObject>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
New-AzPortalDashboard
   -Name <String>
   -ResourceGroupName <String>
   -DashboardPath <String>
   [-SubscriptionId <String>]
   [-DefaultProfile <PSObject>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

Creates or updates a Dashboard.

Examples

Example 1: Create a dashboard using a dashboard template file

New-AzPortalDashboard -DashboardPath .\resources\dash1.json -ResourceGroupName mydash-rg -DashboardName my-dashboard03

Location Name           Type
-------- ----           ----
eastasia my-dashboard03 Microsoft.Portal/dashboards

Create a new dashboard using the provided dashboard template file.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Dashboard

The shared dashboard resource definition. To construct, see NOTES section for DASHBOARD properties and create a hash table.

Type:IDashboard
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-DashboardPath

The Path to an existing dashboard template. Dashboard templates may be downloaded from the portal.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Lens

The dashboard lenses.

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Location

Resource location

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Metadata

The dashboard metadata.

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

The name of the dashboard.

Type:String
Aliases:DashboardName
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

The name of the resource group.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SubscriptionId

The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Accept pipeline input:False
Accept wildcard characters:False
-Tag

Resource tags

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

IDashboard

Outputs

IDashboard

Notes

ALIASES

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

DASHBOARD <IDashboard>: The shared dashboard resource definition.

  • Location <String>: Resource location
  • [Lens <IDashboardPropertiesLenses>]: The dashboard lenses.
    • [(Any) <IDashboardLens>]: This indicates any property can be added to this object.
  • [Metadata <IDashboardPropertiesMetadata>]: The dashboard metadata.
    • [(Any) <Object>]: This indicates any property can be added to this object.
  • [Tag <IDashboardTags>]: Resource tags
    • [(Any) <String>]: This indicates any property can be added to this object.