-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPS-70532-WEBAPPS-MOD02.ps1
67 lines (44 loc) · 1.81 KB
/
PS-70532-WEBAPPS-MOD02.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
break
# #############################################################################
# Manage App Service Plans
# NAME: PS-70532-WEBAPPS-MOD02.ps1
# AUTHOR: Tim Warner
# EMAIL: [email protected]
# #############################################################################
# Press CTRL+M to expand/collapse regions
#region Log into Azure
# connect to subscription (ARM)
Login-AzureRmAccount
Select-AzureRmSubscription -SubscriptionName 'Visual Studio Ultimate with MSDN'
Set-AzureRmCurrentStorageAccount -ResourceGroupName 'Default-Web-EastUS' -StorageAccountName '**teststorage'
Get-AzureRmSubscription
# certificate-based authentication
Get-AzurePublishSettingsFile
Import-AzurePublishSettingsFile -PublishSettingsFile 'path'
# connect to subscription (ASM)
Add-AzureAccount
Select-AzureSubscription -SubscriptionName 'Visual Studio Ultimate with MSDN' -Default
Set-AzureSubscription -SubscriptionName 'Visual Studio Ultimate with MSDN' -CurrentStorageAccountName '**teststorage'
#endregion
#region App Service Plan metadata
Get-Command -Module Azure -noun *hostingplan*
Get-Command -Noun *serviceplan*
New-AzureRmAppServicePlan -ResourceGroupName 'DefaultARMResourceGroup' `
-Name 'TempServicePlan' `
-Location "South Central US" `
-Tier Standard
Get-AzureRmAppServicePlan -Name 'TempServicePlan'
Remove-AzureRmAppServicePlan -Name 'TempServicePlan' -ResourceGroupName 'DefaultARMResourceGroup' -Force
#endregion
#region A bit o' Azure CLI
azure login
azure account list
azure account set
azure config mode arm
azure config mode asm
azure site/webapp --help
azure site list
azure resource list 'resourcegroupname'
azure resource show 'resourcegroupname' microsoft.compute
azure logout -u [email protected]
#endregion