diff --git a/appGW-Start.ps1 b/appGW-Start.ps1 new file mode 100644 index 0000000..1e870e7 --- /dev/null +++ b/appGW-Start.ps1 @@ -0,0 +1,8 @@ +$AppGWName = "appgw-appa-spokea-eastus2" +$AppGWRG = "scenario-appgateway-eus2-rg" + +# Get Azure Application Gateway +$appgw = Get-AzApplicationGateway -Name $AppGWName -ResourceGroupName $AppGWRG + +# Start the Azure Application Gateway +Start-AzApplicationGateway -ApplicationGateway $appgw \ No newline at end of file diff --git a/appGW-Stop.ps1 b/appGW-Stop.ps1 new file mode 100644 index 0000000..52c69f3 --- /dev/null +++ b/appGW-Stop.ps1 @@ -0,0 +1,8 @@ +$AppGWName = "appgw-appa-spokea-eastus2" +$AppGWRG = "scenario-appgateway-eus2-rg" + +# Get Azure Application Gateway +$appgw = Get-AzApplicationGateway -Name $AppGWName -ResourceGroupName $AppGWRG + +# Stop the Azure Application Gateway +Stop-AzApplicationGateway -ApplicationGateway $appgw \ No newline at end of file diff --git a/subCleanUp.ps1 b/subCleanUp.ps1 new file mode 100644 index 0000000..e577a71 --- /dev/null +++ b/subCleanUp.ps1 @@ -0,0 +1,19 @@ +$rgs = get-azresourcegroup + +write-host "Found $($rgs.count) resource groups" -foregroundcolor blue + +ForEach ($rg in $rgs) { + + try { + write-host "Deleting $($rg.ResourceGroupName)." + Remove-AzResourceGroup -name $rg.ResourceGroupName -force + } + + finally { + write-host "Moving to next resource group..." + write-host "..." + write-host "..." + } +} + +