< Back

New-AzureV2VMFromGallaryImage

Tue Jan 14, 2020 12:37 am

NAME New-AzureV2VMFromGallaryImage



SYNOPSIS

Creating virtual machine(s) from gallery image with one line.





SYNTAX

New-AzureV2VMFromGallaryImage [-SubscriptionId] <Object> [-rgName] <Object> [-vmNames] <Object> [[-location]

<Object>] [[-saName] <Object>] [[-vnetName] <Object>] [[-vmSize] <Object>] [[-WindowsSku] <Object>] [[-nsgName]

<Object>] [[-avsetName] <Object>] [[-VMUser] <Object>] [[-VMPass] <Object>] [<CommonParameters>]





DESCRIPTION

This cmdlet will create a single or numerous virtual machines from gallery image with just one line.





PARAMETERS

-SubscriptionId <Object>

Subscription ID for the subscription that virtual machine(s) is on. Required



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-rgName <Object>

Resource group where the resources will be created. Required



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-vmNames <Object>

Name or names of the virtual machine(s) to be created. Required



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-location <Object>

Location where the Azure resources will be created.



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-saName <Object>

Name of the storage account name to use if you want to use un-managed disk. Note: If storage account doesn't

exist, cmdlet will create a unique storage account.



Required? false

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



-vnetName <Object>

Name of the virtual network that virtual machine will be on.



Required? false

Position? 6

Default value

Accept pipeline input? false

Accept wildcard characters? false



-vmSize <Object>

Size of the new virtual machine that is been created Example: Standard_A0 See information in link

https://azure.microsoft.com/en-us/docum ... ows-sizes/.



Required? false

Position? 7

Default value

Accept pipeline input? false

Accept wildcard characters? false



-WindowsSku <Object>

Windows SKU to use to create the virtual machine(s).



Required? false

Position? 8

Default value

Accept pipeline input? false

Accept wildcard characters? false



-nsgName <Object>

Specify a NIC NSG that you will like machine to be on. If not specified a Windows default NSG will be

used/created automatically.



Required? false

Position? 9

Default value

Accept pipeline input? false

Accept wildcard characters? false



-avsetName <Object>



Required? false

Position? 10

Default value

Accept pipeline input? false

Accept wildcard characters? false



-VMUser <Object>

Username that will be used for the Windows configuration.



Required? false

Position? 11

Default value

Accept pipeline input? false

Accept wildcard characters? false



-VMPass <Object>

Password that will be used for the Windows configuration. If not specified a strong random password will be

generated and used.



Required? false

Position? 12

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





Author : Hannel Hazeley - hhazeley@outlook.com



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>New-AzureV2VMFromGallaryImage -SubscriptionId 1d6737e7-4f6c-4e3c-8cd4-996b6f003d0e -rgName DVideoRG1

-vmNames DV1-DPBSV1-001



This will create virtual machine using all cmdlet default configuration.











RELATED LINKS

https://github.com/hhazeley/HannelsTool ... yImage.ps1