mirror of
https://dev.azure.com/effectory/Survey%20Software/_git/Cloud%20Engineering
synced 2026-02-27 18:52:18 +01:00
Cost opmization, key vault, service connection and webapps list updates
This commit is contained in:
@@ -78,7 +78,7 @@ foreach ($managementGroup in $managementGroups)
|
||||
Write-Host "----------------------------------------------------------------------------------------------------------------------------------------------------------------------"
|
||||
Write-Host "Management group [$($managementGroup.Name)]"
|
||||
|
||||
$subscriptions = Get-AzManagementGroupSubscription -Group $managementGroup.Name | Where-Object State -eq "Active"
|
||||
$subscriptions = Get-AzManagementGroupSubscription -Group $managementGroup.Name | Where-Object State -eq "Active" | Where-Object DisplayName -NotLike "Visual Studio*"
|
||||
|
||||
foreach ($subscription in $subscriptions)
|
||||
{
|
||||
@@ -94,12 +94,12 @@ foreach ($managementGroup in $managementGroups)
|
||||
|
||||
foreach ($group in $allResourceGroups) {
|
||||
|
||||
Write-Host $group.ResourceGroupName
|
||||
|
||||
$allWebApps = Get-AzWebApp -ResourceGroupName $group.ResourceGroupName
|
||||
|
||||
foreach ($webApp in $allWebApps) {
|
||||
|
||||
Write-Host $webApp.Name
|
||||
|
||||
[ResourceCheck] $resourceCheck = [ResourceCheck]::new()
|
||||
$resourceCheck.ResourceId = $webApp.Id
|
||||
$resourceCheck.Kind = $webApp.Kind
|
||||
@@ -133,6 +133,8 @@ foreach ($managementGroup in $managementGroups)
|
||||
|
||||
foreach ($slotTemp in $allSlots) {
|
||||
|
||||
Write-Host $slotTemp.Name
|
||||
|
||||
[string] $slotName = $slotTemp.Name.Split("/")[1]
|
||||
$slot = Get-AzWebAppSlot -Name $webApp.Name -ResourceGroupName $webApp.ResourceGroup -Slot $slotName
|
||||
|
||||
|
||||
Reference in New Issue
Block a user