-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcreateoffer.ps1
More file actions
26 lines (19 loc) · 1.03 KB
/
createoffer.ps1
File metadata and controls
26 lines (19 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$location = "local"
$planName = "basic"
$offerName = "basic"
$rgname = "plansoffers"
New-AzureRmResourceGroup -Name plansoffers -Location $location
$subid = (Get-AzureRMSubscription).SubscriptionId
$QuotaIds =
"/subscriptions/$subid/providers/Microsoft.Compute.Admin/locations/local/quotas/Default Quota",
"/subscriptions/$subid/providers/Microsoft.Network.Admin/locations/local/quotas/Default Quota",
"/subscriptions/$subid/providers/Microsoft.Storage.Admin/locations/local/quotas/Default Quota",
"/subscriptions/$subid/providers/Microsoft.KeyVault.Admin/locations/local/quotas/Unlimited"
Write-Host "Creating a new plan..."
$plan = New-AzsPlan -Name $planName -DisplayName $planName -QuotaIds $QuotaIds -ArmLocation $location -ResourceGroupName $rgname
Write-Host "New plan created..."
$plan
Write-Host "Creating a new offer..."
$offer = New-AzsOffer -Name $offerName -DisplayName $offerName -State Public -BasePlanIds $plan.id -ArmLocation $location -ResourceGroupName $rgname
Write-Host "New offer created..."
$offer