|
3 | 3 |
|
4 | 4 | #requires -Modules AzureStack.Connect |
5 | 5 |
|
| 6 | +<# |
| 7 | + .SYNOPSIS |
| 8 | + Add-AzureStackVMSSGalleryItem: Adds the VMSS Gallery Item to your Azure Stack Marketplace. |
| 9 | + Remove-AzureStackVMSSGalleryItem: Adds the VMSS Gallery Item from your Azure Stack Marketplace. |
| 10 | + Add-VMImage: Uploads a VM Image to your Azure Stack and creates a Marketplace item for it. |
| 11 | + Remove-VMImage: Removes an existing VM Image from your Azure Stack. Does not delete any |
| 12 | + maketplace items created by Add-VMImage. |
| 13 | + New-Server2016VMImage: Creates and Uploads a new Server 2016 Core and / or Full Image and |
| 14 | + creates a Marketplace item for it. |
| 15 | + Get-VMImage: Gets a VM Image from your Azure Stack as an Administrator to view the provisioning state of the image. |
| 16 | + Add-VMExtension: Uploads a VM extension to your Azure Stack. |
| 17 | + Remove-VMExtension: Removes an existing VM extension from your Azure Stack. |
| 18 | +#> |
| 19 | + |
6 | 20 | function Add-AzureStackVMSSGalleryItem { |
| 21 | + [CmdletBinding()] |
| 22 | + Param( |
| 23 | + [Parameter(Mandatory=$false)] |
| 24 | + [ValidatePattern("^[0-9a-zA-Z]+$")] |
| 25 | + [ValidateLength(1,128)] |
| 26 | + [String] $Location = 'local' |
| 27 | + ) |
7 | 28 |
|
8 | 29 | $rgName = "vmss.gallery" |
9 | 30 |
|
10 | | - New-AzureRmResourceGroup -Name $rgName -Location local -Force |
| 31 | + New-AzureRmResourceGroup -Name $rgName -Location $Location -Force |
11 | 32 |
|
12 | 33 | $saName = "vmssgallery" |
13 | 34 |
|
14 | | - $sa = New-AzureRmStorageAccount -ResourceGroupName $rgName -Location local -Name $saName -Type Standard_LRS |
| 35 | + $sa = New-AzureRmStorageAccount -ResourceGroupName $rgName -Location $Location -Name $saName -Type Standard_LRS |
15 | 36 |
|
16 | 37 | $cName = "gallery" |
17 | 38 |
|
@@ -41,19 +62,6 @@ function Remove-AzureStackVMSSGalleryItem { |
41 | 62 | } |
42 | 63 | } |
43 | 64 |
|
44 | | -<# |
45 | | - .SYNOPSIS |
46 | | - Contains 6 functions. |
47 | | - Add-VMImage: Uploads a VM Image to your Azure Stack and creates a Marketplace item for it. |
48 | | - Remove-VMImage: Removes an existing VM Image from your Azure Stack. Does not delete any |
49 | | - maketplace items created by Add-VMImage. |
50 | | - New-Server2016VMImage: Creates and Uploads a new Server 2016 Core and / or Full Image and |
51 | | - creates a Marketplace item for it. |
52 | | - Get-VMImage: Gets a VM Image from your Azure Stack as an Administrator to view the provisioning state of the image. |
53 | | - Add-VMExtension: Uploads a VM extension to your Azure Stack. |
54 | | - Remove-VMExtension: Removes an existing VM extension from your Azure Stack. |
55 | | -#> |
56 | | - |
57 | 65 | Function Add-VMImage{ |
58 | 66 |
|
59 | 67 | [CmdletBinding(DefaultParameterSetName='VMImageFromLocal')] |
|
0 commit comments