mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-12-03 02:47:00 +00:00
23 lines
952 B
PowerShell
23 lines
952 B
PowerShell
Write-Host "Your test account configuration:"
|
|
|
|
Import-Module "Az.Accounts" -Scope Local
|
|
Import-Module "Az.Resources" -Scope Local
|
|
|
|
Get-ChildItem env:\DE_TEST_* | ForEach-Object {
|
|
if ($_.Name -eq "DE_TEST_SUBSCRIPTION_ID") {
|
|
$AzSubscription = Get-AzSubscription -SubscriptionId $_.Value -ErrorAction SilentlyContinue | Select-Object -First 1
|
|
if (-not $AzSubscription) {
|
|
Write-Warning "The subscription '$($_.Value)' could not be found."
|
|
}
|
|
Write-Host "* $($_.Name): $($_.Value) ($($AzSubscription.Name))"
|
|
} elseif ($_.Name -eq "DE_TEST_RESOURCE_GROUP") {
|
|
$AzResourceGroup = Get-AzResourceGroup -Name $_.Value -ErrorAction SilentlyContinue
|
|
if (-not $AzResourceGroup) {
|
|
Write-Warning "The resource group '$($_.Value)' could not be found."
|
|
}
|
|
Write-Host "* $($_.Name): $($_.Value) (Confirmed)"
|
|
} else {
|
|
Write-Host "* $($_.Name): $($_.Value)"
|
|
}
|
|
}
|