Modules/BenchPress.Azure/Public/Confirm-PortalDashboard.ps1 (38 lines of code) (raw):
# INLINE_SKIP
using module ./../Classes/ConfirmResult.psm1
. $PSScriptRoot/../Private/Connect-Account.ps1
# end INLINE_SKIP
function Confirm-PortalDashboard {
<#
.SYNOPSIS
Confirms that an Azure Dashboard exists.
.DESCRIPTION
The Confirm-AzBPPortalDashboard cmdlet gets an Azure Dashboard using the specified Dashboard and Resource Group names.
.PARAMETER Name
The name of the Azure Dashboard.
.PARAMETER ResourceGroupName
The name of the Resource Group. The name is case insensitive.
.EXAMPLE
Confirm-AzBPPortalDashboard -Name "benchpresstest" -ResourceGroupName "rgbenchpresstest"
.INPUTS
System.String
.OUTPUTS
ConfirmResult
#>
[CmdletBinding()]
[OutputType([ConfirmResult])]
param (
[Parameter(Mandatory=$true)]
[string]$Name,
[Parameter(Mandatory=$true)]
[string]$ResourceGroupName
)
Begin {
$connectResults = Connect-Account
}
Process {
$resource = Get-AzPortalDashboard -ResourceGroupName $ResourceGroupName -Name $Name
[ConfirmResult]::new($resource, $connectResults.AuthenticationData)
}
End { }
}