diff --git a/src/ResourceManager/Compute/Commands.Compute/Microsoft.Azure.Commands.Compute.dll-Help.psd1 b/src/ResourceManager/Compute/Commands.Compute/Microsoft.Azure.Commands.Compute.dll-Help.psd1 index 2a0beede0007..b8892cce2e99 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Microsoft.Azure.Commands.Compute.dll-Help.psd1 +++ b/src/ResourceManager/Compute/Commands.Compute/Microsoft.Azure.Commands.Compute.dll-Help.psd1 @@ -3,13 +3,13 @@ # # Generated by: Microsoft Corporation # -# Generated on: 4/01/2014 +# Generated on: 12/13/2014 # @{ # Version number of this module. -ModuleVersion = '0.8.11' +ModuleVersion = '0.8.12' # ID used to uniquely identify this module GUID = 'B37DCEB6-F8A8-4C76-B1FC-9C35DFE08977' diff --git a/src/ResourceManager/Compute/Commands.Compute/Microsoft.Azure.Commands.Compute.dll-Help.xml b/src/ResourceManager/Compute/Commands.Compute/Microsoft.Azure.Commands.Compute.dll-Help.xml index ccb4f4e24f09..f88f4c85c2b1 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Microsoft.Azure.Commands.Compute.dll-Help.xml +++ b/src/ResourceManager/Compute/Commands.Compute/Microsoft.Azure.Commands.Compute.dll-Help.xml @@ -1,3418 +1,4753 @@ - - - - - Add-AzureVMDataDisk - - - - - - - Add - AzureVMDataDisk - - - - - - - - - Add-AzureVMDataDisk - - VM - - - - PSVirtualMachine - - - Name - - - - String - - - VhdUri - - - - String - - - Caching - - - - String - - - DiskSizeInGB - - - - Nullable`1[Int32] - - - Lun - - - - Nullable`1[Int32] - - - - - - VM - - - - PSVirtualMachine - - PSVirtualMachine - - - - - - Name - - - - String - - String - - - - - - VhdUri - - - - String - - String - - - - - - Caching - - - - String - - String - - - - - - DiskSizeInGB - - - - Nullable`1[Int32] - - Nullable`1[Int32] - - - - - - Lun - - - - Nullable`1[Int32] - - Nullable`1[Int32] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Add-AzureVMNetworkInterface - - - - - - - Add - AzureVMNetworkInterface - - - - - - - - - Add-AzureVMNetworkInterface - - VM - - - - PSVirtualMachine - - - Id - - - - String - - - - - - VM - - - - PSVirtualMachine - - PSVirtualMachine - - - - - - Id - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Get-AzureAvailabilitySet - - - - - - - Get - AzureAvailabilitySet - - - - - - - - - Get-AzureAvailabilitySet - - ResourceGroupName - - - - String - - - Name - - - - String - - - - - - ResourceGroupName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Get-AzureStorageAccount - - - - - - - Get - AzureStorageAccount - - - - - - - - - Get-AzureStorageAccount - - ResourceGroupName - - - - String - - - Name - - - - String - - - - - - ResourceGroupName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Get-AzureStorageAccountKey - - - - - - - Get - AzureStorageAccountKey - - - - - - - - - Get-AzureStorageAccountKey - - ResourceGroupName - - - - String - - - Name - - - - String - - - - - - ResourceGroupName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Get-AzureVM - - - - - - - Get - AzureVM - - - - - - - - - Get-AzureVM - - ResourceGroupName - - - - String - - - - Get-AzureVM - - ResourceGroupName - - - - String - - - Name - - - - String - - - Status - - - - SwitchParameter - - - - - - ResourceGroupName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - Status - - - - SwitchParameter - - SwitchParameter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Get-AzureVMExtension - - - - - - - Get - AzureVMExtension - - - - - - - - - Get-AzureVMExtension - - ResourceGroupName - - - - String - - - VMName - - - - String - - - Name - - - - String - - - Status - - - - SwitchParameter - - - - - - ResourceGroupName - - - - String - - String - - - - - - VMName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - Status - - - - SwitchParameter - - SwitchParameter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - New-AzureAvailabilitySet - - - - - - - New - AzureAvailabilitySet - - - - - - - - - New-AzureAvailabilitySet - - ResourceGroupName - - - - String - - - Name - - - - String - - - Location - - - - String - - - - - - ResourceGroupName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - Location - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - New-AzureStorageAccount - - - - - - - New - AzureStorageAccount - - - - - - - - - New-AzureStorageAccount - - ResourceGroupName - - - - String - - - Name - - - - String - - - Type - - - - String - - - Location - - - - String - - - - - - ResourceGroupName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - Type - - - - String - - String - - - - - - Location - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - New-AzureStorageAccountKey - - - - - - - New - AzureStorageAccountKey - - - - - - - - - New-AzureStorageAccountKey - - ResourceGroupName - - - - String - - - Name - - - - String - - - KeyName - - - - String - - - - - - ResourceGroupName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - KeyName - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - New-AzureVM - - - - - - - New - AzureVM - - - - - - - - - New-AzureVM - - ResourceGroupName - - - - String - - - Location - - - - String - - - VM - - - - PSVirtualMachine - - - Name - - - - String - - - - - - ResourceGroupName - - - - String - - String - - - - - - Location - - - - String - - String - - - - - - VM - - - - PSVirtualMachine - - PSVirtualMachine - - - - - - Name - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - New-AzureVMConfig - - - - - - - New - AzureVMConfig - - - - - - - - - New-AzureVMConfig - - VMName - - - - String - - - VMSize - - - - String - - - AvailabilitySetId - - - - String - - - - - - VMName - - - - String - - String - - - - - - VMSize - - - - String - - String - - - - - - AvailabilitySetId - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Remove-AzureAvailabilitySet - - - - - - - Remove - AzureAvailabilitySet - - - - - - - - - Remove-AzureAvailabilitySet - - ResourceGroupName - - - - String - - - Name - - - - String - - - - - - ResourceGroupName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Remove-AzureStorageAccount - - - - - - - Remove - AzureStorageAccount - - - - - - - - - Remove-AzureStorageAccount - - ResourceGroupName - - - - String - - - Name - - - - String - - - - - - ResourceGroupName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Remove-AzureVM - - - - - - - Remove - AzureVM - - - - - - - - - Remove-AzureVM - - ResourceGroupName - - - - String - - - Name - - - - String - - - Force - - - - SwitchParameter - - - - - - ResourceGroupName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - Force - - - - SwitchParameter - - SwitchParameter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Remove-AzureVMDataDisk - - - - - - - Remove - AzureVMDataDisk - - - - - - - - - Remove-AzureVMDataDisk - - VM - - - - PSVirtualMachine - - - Name - - - - String - - - - - - VM - - - - PSVirtualMachine - - PSVirtualMachine - - - - - - Name - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Remove-AzureVMExtension - - - - - - - Remove - AzureVMExtension - - - - - - - - - Remove-AzureVMExtension - - Force - - - - SwitchParameter - - - ResourceGroupName - - - - String - - - VMName - - - - String - - - Name - - - - String - - - - - - Force - - - - SwitchParameter - - SwitchParameter - - - - - - ResourceGroupName - - - - String - - String - - - - - - VMName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Restart-AzureVM - - - - - - - Restart - AzureVM - - - - - - - - - Restart-AzureVM - - ResourceGroupName - - - - String - - - Name - - - - String - - - - - - ResourceGroupName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set-AzureStorageAccount - - - - - - - Set - AzureStorageAccount - - - - - - - - - Set-AzureStorageAccount - - ResourceGroupName - - - - String - - - Name - - - - String - - - Type - - - - String - - - - Set-AzureStorageAccount - - ResourceGroupName - - - - String - - - Name - - - - String - - - CustomDomainName - - - - String - - - UseSubDomainName - - - - Nullable`1[Boolean] - - - - Set-AzureStorageAccount - - ResourceGroupName - - - - String - - - Name - - - - String - - - Tags - - - - Hashtable[] - - - - - - ResourceGroupName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - Type - - - - String - - String - - - - - - CustomDomainName - - - - String - - String - - - - - - UseSubDomainName - - - - Nullable`1[Boolean] - - Nullable`1[Boolean] - - - - - - Tags - - - - Hashtable[] - - Hashtable[] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set-AzureVMExtension - - - - - - - Set - AzureVMExtension - - - - - - - - - Set-AzureVMExtension - - ResourceGroupName - - - - String - - - VMName - - - - String - - - Name - - - - String - - - Publisher - - - - String - - - Type - - - - String - - - TypeHandlerVersion - - - - String - - - Settings - - - - Hashtable - - - ProtectedSettings - - - - Hashtable - - - Location - - - - String - - - - Set-AzureVMExtension - - ResourceGroupName - - - - String - - - VMName - - - - String - - - Name - - - - String - - - Publisher - - - - String - - - Type - - - - String - - - TypeHandlerVersion - - - - String - - - SettingString - - - - String - - - ProtectedSettingString - - - - String - - - Location - - - - String - - - - - - ResourceGroupName - - - - String - - String - - - - - - VMName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - Publisher - - - - String - - String - - - - - - Type - - - - String - - String - - - - - - TypeHandlerVersion - - - - String - - String - - - - - - Settings - - - - Hashtable - - Hashtable - - - - - - ProtectedSettings - - - - Hashtable - - Hashtable - - - - - - Location - - - - String - - String - - - - - - SettingString - - - - String - - String - - - - - - ProtectedSettingString - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set-AzureVMOperatingSystem - - - - - - - Set - AzureVMOperatingSystem - - - - - - - - - Set-AzureVMOperatingSystem - - VM - - - - PSVirtualMachine - - - Windows - - - - SwitchParameter - - - ComputerName - - - - String - - - Credential - - - - PSCredential - - - ProvisionVMAgent - - - - SwitchParameter - - - - Set-AzureVMOperatingSystem - - VM - - - - PSVirtualMachine - - - Linux - - - - SwitchParameter - - - ComputerName - - - - String - - - Credential - - - - PSCredential - - - ProvisionVMAgent - - - - SwitchParameter - - - SSHPublicKey - - - - String[] - - - - - - VM - - - - PSVirtualMachine - - PSVirtualMachine - - - - - - Windows - - - - SwitchParameter - - SwitchParameter - - - - - - ComputerName - - - - String - - String - - - - - - Credential - - - - PSCredential - - PSCredential - - - - - - ProvisionVMAgent - - - - SwitchParameter - - SwitchParameter - - - - - - Linux - - - - SwitchParameter - - SwitchParameter - - - - - - SSHPublicKey - - - - String[] - - String[] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set-AzureVMOSDisk - - - - - - - Set - AzureVMOSDisk - - - - - - - - - Set-AzureVMOSDisk - - VM - - - - PSVirtualMachine - - - DestinationVhdsContainer - - - - String - - - SourceImageName - - - - String - - - - Set-AzureVMOSDisk - - VM - - - - PSVirtualMachine - - - OSDiskName - - - - String - - - OSDiskVHDUri - - - - String - - - - - - VM - - - - PSVirtualMachine - - PSVirtualMachine - - - - - - DestinationVhdsContainer - - - - String - - String - - - - - - SourceImageName - - - - String - - String - - - - - - OSDiskName - - - - String - - String - - - - - - OSDiskVHDUri - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Start-AzureVM - - - - - - - Start - AzureVM - - - - - - - - - Start-AzureVM - - ResourceGroupName - - - - String - - - Name - - - - String - - - - - - ResourceGroupName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Stop-AzureVM - - - - - - - Stop - AzureVM - - - - - - - - - Stop-AzureVM - - Force - - - - SwitchParameter - - - ResourceGroupName - - - - String - - - Name - - - - String - - - - - - Force - - - - SwitchParameter - - SwitchParameter - - - - - - ResourceGroupName - - - - String - - String - - - - - - Name - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Update-AzureVM - - - - - - - Update - AzureVM - - - - - - - - - Update-AzureVM - - ResourceGroupName - - - - String - - - Location - - - - String - - - VM - - - - PSVirtualMachine - - - Name - - - - String - - - - - - ResourceGroupName - - - - String - - String - - - - - - Location - - - - String - - String - - - - - - VM - - - - PSVirtualMachine - - PSVirtualMachine - - - - - - Name - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + Add-AzureVMDataDisk + + Add Data Disk to VM + + + + + Add + AzureVMDataDisk + + + + This cmdlets allows you to add a Data Disk to the VM at creation time or to an existing VM + + + + Add-AzureVMDataDisk + + VM + + Local VM Object to add the Data Disk to. The local VM object can be created with New-AzureVMConfig cmdlet or gotten through the Get-AzureVM cmdlet. + + PSVirtualMachine + + + Name + + Name of the Data Disk + + String + + + VhdUri + + Specifies the VHD file that needs to be created when a platform image or user image is used. This is where the image blob will be copied to start the VM from. + + String + + + Caching + + Specifies the caching mode of the disk. This setting impacts the consistency and performance of the disk. Note: Changing this value causes the Virtual Machine to reboot. + + Possible values are: + • ReadOnly + • ReadWrite + + The default value is ReadWrite. + + String + + + DiskSizeInGB + + Specifies the size, in GB, of an empty disk to be attached to the Virtual Machine. + + Nullable`1[Int32] + + + Lun + + Specifies the Logical Unit Number (LUN) for the data disk. If the disk is the first disk that is added, this element is optional and the default value of 0 is used. If more than one disk is being added, this element is required. + + Nullable`1[Int32] + + + + + + VM + + Local VM Object to add the Data Disk to. The local VM object can be created with New-AzureVMConfig cmdlet or gotten through the Get-AzureVM cmdlet. + + PSVirtualMachine + + PSVirtualMachine + + + + + + + Name + + Name of the Data Disk + + String + + String + + + + + + + VhdUri + + Specifies the VHD file that needs to be created when a platform image or user image is used. This is where the image blob will be copied to start the VM from. + + String + + String + + + + + + + Caching + + Specifies the caching mode of the disk. This setting impacts the consistency and performance of the disk. Note: Changing this value causes the Virtual Machine to reboot. + + Possible values are: + • ReadOnly + • ReadWrite + + The default value is ReadWrite. + + String + + String + + + + + + + DiskSizeInGB + + Specifies the size, in GB, of an empty disk to be attached to the Virtual Machine. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + + Lun + + Specifies the Logical Unit Number (LUN) for the data disk. If the disk is the first disk that is added, this element is optional and the default value of 0 is used. If more than one disk is being added, this element is required. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Add Data Disk to a new VM -------------------------- + + PS C:\> + + + # Create the local VM Object + $vm = New-AzureVMConfig –VMName “myVM” –VMSize “Standard_A1" -AvailabilitySetID $as1.Id + + # Add Data Disk disk1 to this VM + Add-AzureVMDataDisk –VM $vm –Name "disk1" –VhdUri "http://storageaccountname.blob.core.windows.net/vhds/test2.vhd" –LUN 0 –Caching ReadOnly –DiskSizeinGB 1 + + + + + + + + + + + + + + + + + + -------------------------- Add a Data Disk to an existing VM -------------------------- + + PS C:\> + + + # Get the VM + $vm = Get-AzureVM -ResourceGroupName "myRG" -Name "crpVM" + + # Add Data Disk disk1 to VM + Add-AzureVMDataDisk –VM $vm –Name "disk1" –VhdUri "http://storageaccountname.blob.core.windows.net/vhds/test2.vhd" –LUN 0 –Caching ReadOnly –DiskSizeinGB 1 + + # Update VM state + Update-AzureVM -ResourceGroupName "myRG" -Name "crpVM" –VM $vm + + + + + + + + + + + + + + + + + + + + + + + + Add-AzureVMNetworkInterface + + Add a Network Interface to the VM + + + + + Add + AzureVMNetworkInterface + + + + This cmdlets allows you to add a NIC to the VM at creation time or to an existing VM + + + + Add-AzureVMNetworkInterface + + VM + + Local VM Object to add the Network Interface to. The local VM object can be created with New-AzureVMConfig cmdlet or gotten through the Get-AzureVM cmdlet. + + PSVirtualMachine + + + Id + + Id of the Network Interface. This can be gotten using the Get-AzureNetworkInterface cmdlet. + + String + + + + + + VM + + Local VM Object to add the Network Interface to. The local VM object can be created with New-AzureVMConfig cmdlet or gotten through the Get-AzureVM cmdlet. + + PSVirtualMachine + + PSVirtualMachine + + + + + + + Id + + Id of the Network Interface. This can be gotten using the Get-AzureNetworkInterface cmdlet. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Add a Network Interface to a new VM -------------------------- + + PS C:\> + + + # Get the VM + $vm = Get-AzureVM -ResourceGroupName "myRG" -Name "crpVM + + # Add a Network Interface to the VM + Add-AzureVMNetworkInterface –VM $vm –Id "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Network/NetworkAdapters/Nic1" + + + + + + + + + + + + + + + + + + -------------------------- Add a Network Interface to an existing VM -------------------------- + + PS C:\> + + + # Get the VM + $vm = Get-AzureVM -ResourceGroupName "myRG" -Name "crpVM" + + # Add a Network Interface to the VM + Add-AzureVMNetworkInterface –VM $vm –Id "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Network/NetworkAdapters/Nic1" + + # Update VM state + Update-AzureVM -ResourceGroupName "myRG" -Name "crpVM" –VM $vm + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureAvailabilitySet + + Get Availability Set properties + + + + + Get + AzureAvailabilitySet + + + + This cmdlet allows you to discover information about a specified Availability Set or all Availability Sets within a Resource Group + + + + Get-AzureAvailabilitySet + + ResourceGroupName + + Name of the Resource Group containing the Avaialbility Set + + String + + + Name + + Name of the Availability Set + + String + + + + + + ResourceGroupName + + Name of the Resource Group containing the Avaialbility Set + + String + + String + + + + + + + Name + + Name of the Availability Set + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Get information about a specified Availability Set -------------------------- + + PS C:\> + + Get-AzureAvailabilitySet –ResourceGroupName “RG1” –Name “MyASet” + + + + + + + + + + + + + + + + + -------------------------- Get information about all Availability Sets within a Resource Group -------------------------- + + PS C:\> + + Get-AzureAvailabilitySet –ResourceGroupName “RG1” + + + + + + + + + + + + + + + + + + + + + + + Get-AzureStorageAccount + + Get the properties of a Storage Account + + + + + Get + AzureStorageAccount + + + + This cmdlet allows you to get the properties of a specified Storage Account or all Storage Accounts within a Resource Group + + + + Get-AzureStorageAccount + + ResourceGroupName + + Name of the Resource Group + + String + + + Name + + Name of the Storage Account + + String + + + + + + ResourceGroupName + + Name of the Resource Group + + String + + String + + + + + + + Name + + Name of the Storage Account + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Get a specified storage account -------------------------- + + PS C:\> + + + #Get one storage account + Get-AzureStorageAccount -ResourceGroupName "RG1" -AccountName "myStorageAccount" + + + + + + + + + + + + + + + + + + -------------------------- Get all Storage Accounts in a Resource Group -------------------------- + + PS C:\> + + + # Get all Storage Accounts in a Resource Group + Get-AzureStorageAccount -ResourceGroupName "RG1" + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureStorageAccountKey + + Get the access keys for an Azure storage account + + + + + Get + AzureStorageAccountKey + + + + This cmdlet allows you to get the access keys for an Azure storage account. + + + + Get-AzureStorageAccountKey + + ResourceGroupName + + Name of the Resource Group + + String + + + Name + + Name of the Storage Account + + String + + + + + + ResourceGroupName + + Name of the Resource Group + + String + + String + + + + + + + Name + + Name of the Storage Account + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Get the access keys for a Storage Account -------------------------- + + PS C:\> + + + #Get keys + Get-AzureStorageAccountKey -ResourceGroupName "RG1" -AccountName "myStorageAccount" + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureVM + + Get the properties of a VM + + + + + Get + AzureVM + + + + This cmdlet allows you to get the model or instance view of the VM. By default the returned VM object contains both model view (user specified properties) and instance view (instance level status). If you'd like to see only the instance view of a VM use the -Status switch. + + + + Get-AzureVM + + ResourceGroupName + + Name of the Resource Group + + String + + + + Get-AzureVM + + ResourceGroupName + + Name of the Resource Group + + String + + + Name + + Name of the VM + + String + + + Status + + Allows you to only return the Instance View + + SwitchParameter + + + + + + ResourceGroupName + + Name of the Resource Group + + String + + String + + + + + + + Name + + Name of the VM + + String + + String + + + + + + + Status + + Allows you to only return the Instance View + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Get the properties of a VM -------------------------- + + PS C:\> + + + # Get the VM + $vm = Get-AzureVM -ResourceGroupName "myRG" -Name "crpVM" + + + + + + + + + + + + + + + + + + -------------------------- Get only the status of VM -------------------------- + + PS C:\> + + + # Get the VM instance view + $vm = Get-AzureVM -ResourceGroupName "myRG" -Name "crpVM" -Status + + + + + + + + + + + + + + + + + + -------------------------- Get all VMs in a Resource Group -------------------------- + + PS C:\> + + + # Get the VM + $vm = Get-AzureVM -ResourceGroupName "myRG" + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureVMExtension + + Get the extensions installed on the VM + + + + + Get + AzureVMExtension + + + + Get properties about the extensions installed on a VM. To get only the instance view of the extensions use the -Status switch. + + + + Get-AzureVMExtension + + ResourceGroupName + + Name of the Resource Group + + String + + + VMName + + Name of the VM + + String + + + Name + + Name of the Extension + + String + + + Status + + Return only the status view of the Extension + + SwitchParameter + + + + + + ResourceGroupName + + Name of the Resource Group + + String + + String + + + + + + + VMName + + Name of the VM + + String + + String + + + + + + + Name + + Name of the Extension + + String + + String + + + + + + + Status + + Return only the status view of the Extension + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Get the properties of an extension -------------------------- + + PS C:\> + + Get-AzureVMExtension -ResourceGroupName "RG1" -VMName "crpVM" -Name "testext" + + + + + + + + + + + + + + + + + -------------------------- Get the status view of an extension -------------------------- + + PS C:\> + + Get-AzureVMExtension -ResourceGroupName "RG1" -VMName "crpVM" -Name "testext" -Status + + + + + + + + + + + + + + + + + + + + + + + New-AzureAvailabilitySet + + Create an Availability Set + + + + + New + AzureAvailabilitySet + + + + This cmdlet allows you to create an Availability Set + + + + New-AzureAvailabilitySet + + ResourceGroupName + + Name of Resource Group + + String + + + Name + + Name of Availability Set + + String + + + Location + + Location of the Availability Set + + String + + + + + + ResourceGroupName + + Name of Resource Group + + String + + String + + + + + + + Name + + Name of Availability Set + + String + + String + + + + + + + Location + + Location of the Availability Set + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Create an Availability Set -------------------------- + + PS C:\> + + New-AzureAvailabilitySet -ResourceGroupName "RG1" -Name "myASet" -Location "West US" + + + + + + + + + + + + + + + + + + + + + + + New-AzureStorageAccount + + + + + + + New + AzureStorageAccount + + + + + + + + New-AzureStorageAccount + + ResourceGroupName + + + + String + + + Name + + + + String + + + Type + + + + String + + + Location + + + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + + Name + + + + String + + String + + + + + + + Type + + + + String + + String + + + + + + + Location + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureStorageAccountKey + + + + + + + New + AzureStorageAccountKey + + + + + + + + New-AzureStorageAccountKey + + ResourceGroupName + + + + String + + + Name + + + + String + + + KeyName + + + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + + Name + + + + String + + String + + + + + + + KeyName + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureVM + + Create a new VM + + + + + New + AzureVM + + + + This cmdlet allows you to create a new VM in Azure. This cmdlet takes a VM object as input which can be created using the New-AzureVMConfig cmdlet. The VM object must then be configured correctly using appropriate cmdlets such as Set-AzureVMOperatingSystem, Set-AzureVMSourceImage, Set-AzureVMNetworkInterface etc. before the VM can be created in Azure succesfully. + + + + New-AzureVM + + ResourceGroupName + + Name of the Resource Group + + String + + + Location + + Location of the VM + + String + + + VM + + VM object that is configured and represents the state of the VM to be created. The VM object can be created using the New-AzureVMConfig cmdlet. The VM object must then be configured correctly using appropriate cmdlets such as Set-AzureVMOperatingSystem, Set-AzureVMSourceImage, Set-AzureVMNetworkInterface etc. before the VM can be created in Azure succesfully. + + PSVirtualMachine + + + Name + + + + String + + + + + + ResourceGroupName + + Name of the Resource Group + + String + + String + + + + + + + Location + + Location of the VM + + String + + String + + + + + + + VM + + VM object that is configured and represents the state of the VM to be created. The VM object can be created using the New-AzureVMConfig cmdlet. The VM object must then be configured correctly using appropriate cmdlets such as Set-AzureVMOperatingSystem, Set-AzureVMSourceImage, Set-AzureVMNetworkInterface etc. before the VM can be created in Azure succesfully. + + PSVirtualMachine + + PSVirtualMachine + + + + + + + Name + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Create a VM with two Data Disks -------------------------- + + PS C:\> + + + # Common + $rgname = "myrg" + $loc = 'West US'; + $vmsize = 'Standard_A2'; + $vmname = 'vm' + $rgname; + + # Create Resource Group + New-AzureResourceGroup -Name $rgname -Location $loc; + + # Create VM Object + $vm = New-AzureVMConfig -VMName $vmname -VMSize $vmsize; + + # Setup Networking + $subnet = New-AzureVirtualNetworkSubnetConfig -Name ('subnet' + $rgname) -AddressPrefix "10.0.0.0/24" -DnsServer "10.1.1.1"; + $vnet = New-AzureVirtualNetwork -Force -Name ('vnet' + $rgname) -ResourceGroupName $rgname -Location $loc -AddressPrefix "10.0.0.0/16" -DnsServer "10.1.1.1" -Subnet $subnet; + $vnet = Get-AzureVirtualNetwork -Name ('vnet' + $rgname) -ResourceGroupName $rgname; + $subnetId = $vnet.Properties.Subnets[0].Id; + $pubip = New-AzurePublicIpAddress -Force -Name ('pubip' + $rgname) -ResourceGroupName $rgname -Location $loc -AllocationMethod Dynamic -DomainNameLabel ('pubip' + $rgname); + $pubip = Get-AzurePublicIpAddress -Name ('pubip' + $rgname) -ResourceGroupName $rgname; + $pubipId = $pubip.Id; + $nic = New-AzureNetworkInterface -Force -Name ('nic' + $rgname) -ResourceGroupName $rgname -Location $loc -AllocationMethod Dynamic -SubnetId $subnetId -PublicIpAddressId $pubip.Id; + $nic = Get-AzureNetworkInterface -Name ('nic' + $rgname) -ResourceGroupName $rgname; + $nicId = $nic.Id; + + # Add NIC to VM + $vm = Add-AzureVMNetworkInterface -VM $vm -Id $nicId; + + # Setup Storage + $stoname = 'sto' + $rgname; + $stotype = 'Standard_GRS'; + + New-AzureStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype; + $stoaccount = Get-AzureStorageAccount -ResourceGroupName $rgname -Name $stoname; + + $osDiskName = 'osDisk'; + $osDiskCaching = 'ReadWrite'; + $osDiskVhdUri = "https://$stoname.blob.core.windows.net/test/os.vhd"; + $dataDiskVhdUri1 = "https://$stoname.blob.core.windows.net/test/data1.vhd"; + $dataDiskVhdUri2 = "https://$stoname.blob.core.windows.net/test/data2.vhd"; + + # Add Data Disks + $vm = Add-AzureVMDataDisk -VM $vm -Name 'testDataDisk1' -Caching 'ReadOnly' -DiskSizeInGB 10 -Lun 0 -VhdUri $dataDiskVhdUri1; + $vm = Add-AzureVMDataDisk -VM $vm -Name 'testDataDisk2' -Caching 'ReadOnly' -DiskSizeInGB 11 -Lun 1 -VhdUri $dataDiskVhdUri2; + + # Setup OS & Image + $user = "Foo12"; + $password = 'BaR@123' + $rgname; + $securePassword = ConvertTo-SecureString $password -AsPlainText -Force; + $cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword); + + $computerName = 'test'; + $vhdContainer = "https://$stoname.blob.core.windows.net/test"; + $img = 'a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201410.01-en.us-127GB.vhd'; + + $vm = Set-AzureVMOperatingSystem -VM $vm -Windows -ComputerName $computerName -Credential $cred; + $vm = Set-AzureVMSourceImage -VM $vm -Name $img -DestinationVhdsContainer $vhdContainer; + + # Create Virtual Machine + New-AzureVM -ResourceGroupName $rgname -Location $loc -Name $vmname -VM $vm; + + + + + + + + + + + + + + + + + + + + + + + + New-AzureVMConfig + + Create the configurable local VM Object + + + + + New + AzureVMConfig + + + + This cmdlet allows you to create the configurable local VM Object. The VM object must then be configured correctly using appropriate cmdlets such as Set-AzureVMOperatingSystem, Set-AzureVMSourceImage, Set-AzureVMNetworkInterface etc. before the VM can be created in Azure succesfully. + + + + New-AzureVMConfig + + VMName + + Name of the VM + + String + + + VMSize + + Size of the VM + + String + + + AvailabilitySetId + + Id of the Availability Set. This can be gotten through Get-AzureAvailabilitySet cmdlet. + + String + + + + + + VMName + + Name of the VM + + String + + String + + + + + + + VMSize + + Size of the VM + + String + + String + + + + + + + AvailabilitySetId + + Id of the Availability Set. This can be gotten through Get-AzureAvailabilitySet cmdlet. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Create a new VM Object -------------------------- + + PS C:\> + + + # Get the Availability Set + $as = Get-AzureAvailabilitySet –ResourceGroupName “RG1” –Name “MyASet” + + # Create the VM object + $vm = New-AzureVMConfig –VMName “myVM” –VMSize “Standard_A1" -AvailabilitySetID $as.Id + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureAvailabilitySet + + Remove an Availability Set from Azure + + + + + Remove + AzureAvailabilitySet + + + + Remove an Availability Set from Azure + + + + Remove-AzureAvailabilitySet + + ResourceGroupName + + Name of the Resource Group + + String + + + Name + + Name of the Availability Set + + String + + + + + + ResourceGroupName + + Name of the Resource Group + + String + + String + + + + + + + Name + + Name of the Availability Set + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Remove Availability Set -------------------------- + + PS C:\> + + Remove-AzureAvailabilitySet –Name “MyASet” –ResouceGroupName “RG1” + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureStorageAccount + + Remove Storage Account from Azure + + + + + Remove + AzureStorageAccount + + + + Remove Storage Account from Azure + + + + Remove-AzureStorageAccount + + ResourceGroupName + + Name of the Resource Group + + String + + + Name + + Name of the VM + + String + + + + + + ResourceGroupName + + Name of the Resource Group + + String + + String + + + + + + + Name + + Name of the VM + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Remove Storage Account -------------------------- + + PS C:\> + + Remove-AzureStorageAccount -ResourceGroupName "RG1" -AccountName "myStorageAccount" + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureVM + + Remove VM from Azure + + + + + Remove + AzureVM + + + + Remove VM from Azure + + + + Remove-AzureVM + + ResourceGroupName + + Name of the Resource Group + + String + + + Name + + Name of the VM + + String + + + Force + + + + SwitchParameter + + + + + + ResourceGroupName + + Name of the Resource Group + + String + + String + + + + + + + Name + + Name of the VM + + String + + String + + + + + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Remove a VM -------------------------- + + PS C:\> + + Remove-AzureVM -ResourceGroupName "myRG" -Name "crpVM" + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureVMDataDisk + + Remove a Data Disk from the VM + + + + + Remove + AzureVMDataDisk + + + + This cmdlet allows you to remove a Data Disk from the VM + + + + Remove-AzureVMDataDisk + + VM + + Local VM object to remove the Data Disk from. This object can be gotten from the Get-AzureVM cmdlet. + + PSVirtualMachine + + + Name + + Name of the Data Disk to be removed + + String + + + + + + VM + + Local VM object to remove the Data Disk from. This object can be gotten from the Get-AzureVM cmdlet. + + PSVirtualMachine + + PSVirtualMachine + + + + + + + Name + + Name of the Data Disk to be removed + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Remove a Data Disk -------------------------- + + PS C:\> + + + # Get the VM + $vm = Get-AzureVM -ResourceGroupName "myRG" -Name "crpVM" + + # Remove "disk3" Data Disk from the local object + Remove-AzureVMDataDisk -VM $vm -Name 'disk3' + + # Update the state of the Azure VM + Update-AzureVM -ResourceGroupName "myRG" -Name "crpVM" –VM $vm + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureVMExtension + + Remove an Extension from a VM + + + + + Remove + AzureVMExtension + + + + Remove an extension from a VM + + + + Remove-AzureVMExtension + + Force + + + + SwitchParameter + + + ResourceGroupName + + Name of Resource Group + + String + + + VMName + + Name of the VM + + String + + + Name + + Name of the Extension + + String + + + + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + + ResourceGroupName + + Name of Resource Group + + String + + String + + + + + + + VMName + + Name of the VM + + String + + String + + + + + + + Name + + Name of the Extension + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Remove an Extension -------------------------- + + PS C:\> + + Remove-AzureVMExtension –ResouceGroupName "RG" –Name "myext" -VMName "vm1" + + + + + + + + + + + + + + + + + + + + + + + Restart-AzureVM + + Restart a VM + + + + + Restart + AzureVM + + + + Restart a VM + + + + Restart-AzureVM + + ResourceGroupName + + Name of Resource Group + + String + + + Name + + Name of the VM + + String + + + + + + ResourceGroupName + + Name of Resource Group + + String + + String + + + + + + + Name + + Name of the VM + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + PS C:\> + + Restart-AzureVM -ResourceGroupName "myRG" -Name "crpVM" + + + + + + + + + + + + + + + + + + + + + + + Set-AzureStorageAccount + + Update the Storage Account properties + + + + + Set + AzureStorageAccount + + + + This cmdlet allows you to update the Storage Account properties. + + + + Set-AzureStorageAccount + + ResourceGroupName + + Name of the Resource Group + + String + + + Name + + Name of the Storage Account + + String + + + Type + + Specifies the account type of the storage account. One of four options: + + • Standard_LRS (Locally-redundant storage) + • Standard_GRS (Geo-redundant storage) + • Standard_RAGRS (Read access geo-redundant storage) + • Standard_ZRS + + + Note that Standard_ZRS accounts cannot be changed to other account types, and other account types cannot be changed to Standard_ZRS. + + + String + + + + Set-AzureStorageAccount + + ResourceGroupName + + Name of the Resource Group + + String + + + Name + + Name of the Storage Account + + String + + + CustomDomainName + + The name of the custom domain. + + String + + + UseSubDomainName + + + + Nullable`1[Boolean] + + + + Set-AzureStorageAccount + + ResourceGroupName + + Name of the Resource Group + + String + + + Name + + Name of the Storage Account + + String + + + Tags + + + + Hashtable[] + + + + + + ResourceGroupName + + Name of the Resource Group + + String + + String + + + + + + + Name + + Name of the Storage Account + + String + + String + + + + + + + Type + + Specifies the account type of the storage account. One of four options: + + • Standard_LRS (Locally-redundant storage) + • Standard_GRS (Geo-redundant storage) + • Standard_RAGRS (Read access geo-redundant storage) + • Standard_ZRS + + + Note that Standard_ZRS accounts cannot be changed to other account types, and other account types cannot be changed to Standard_ZRS. + + + String + + String + + + + + + + CustomDomainName + + The name of the custom domain. + + String + + String + + + + + + + UseSubDomainName + + + + Nullable`1[Boolean] + + Nullable`1[Boolean] + + + + + + + Tags + + + + Hashtable[] + + Hashtable[] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Set Storage Account type -------------------------- + + PS C:\> + + + # Set account type + Set-AzureStorageAccount -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -AccountType "Standard_RAGRS" + + + + + + + + + + + + + + + + + + -------------------------- Set Custom Domain -------------------------- + + PS C:\> + + + #Set custom domain + Set-AzureStorageAccount -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -CustomDomainName "domain name" –UseSubDomain “true” + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureVMExtension + + Add or Update a VM extension on a VM + + + + + Set + AzureVMExtension + + + + This cmdlet allows you to add an Extensions to a VM or update an existing Extensions properties + + + + Set-AzureVMExtension + + ResourceGroupName + + Name of the Resource Group + + String + + + VMName + + Name of the VM + + String + + + Name + + Name of the Extension + + String + + + Publisher + + Name of the extension publisher as provided when the extension was registered. + + String + + + Type + + Type of Extension + + String + + + TypeHandlerVersion + + The version of the extension to be used on the VM. + + String + + + Settings + + Public configuration for the Extension that do not require encryption. This parameter accepts a Hast Table object. + + Hashtable + + + ProtectedSettings + + Private configuration for the Extension that will be encrypted. This parameter accepts a Hast Table object. + + Hashtable + + + Location + + + + String + + + + Set-AzureVMExtension + + ResourceGroupName + + Name of the Resource Group + + String + + + VMName + + Name of the VM + + String + + + Name + + Name of the Extension + + String + + + Publisher + + Name of the extension publisher as provided when the extension was registered. + + String + + + Type + + Type of Extension + + String + + + TypeHandlerVersion + + The version of the extension to be used on the VM. + + String + + + SettingString + + Public configuration for the Extension that do not require encryption. This parameter accepts string input. + + String + + + ProtectedSettingString + + Private configuration for the Extension that will be encrypted. This parameter accepts string input. + + String + + + Location + + + + String + + + + + + ResourceGroupName + + Name of the Resource Group + + String + + String + + + + + + + VMName + + Name of the VM + + String + + String + + + + + + + Name + + Name of the Extension + + String + + String + + + + + + + Publisher + + Name of the extension publisher as provided when the extension was registered. + + String + + String + + + + + + + Type + + Type of Extension + + String + + String + + + + + + + TypeHandlerVersion + + The version of the extension to be used on the VM. + + String + + String + + + + + + + Settings + + Public configuration for the Extension that do not require encryption. This parameter accepts a Hast Table object. + + Hashtable + + Hashtable + + + + + + + ProtectedSettings + + Private configuration for the Extension that will be encrypted. This parameter accepts a Hast Table object. + + Hashtable + + Hashtable + + + + + + + Location + + + + String + + String + + + + + + + SettingString + + Public configuration for the Extension that do not require encryption. This parameter accepts string input. + + String + + String + + + + + + + ProtectedSettingString + + Private configuration for the Extension that will be encrypted. This parameter accepts string input. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Set Extension by Hash Table input -------------------------- + + PS C:\> + + + $rgname = "RG1" + $loc = "West US" + $vmname = "myVM" + + # Virtual Machine Extension + $extname = 'csetest'; + $publisher = 'Microsoft.Compute'; + $exttype = 'CustomScriptExtension'; + $extver = '1.1'; + + # Set extension settings by hash table + $settings = @{"fileUris" = "[]"; "commandToExecute" = ""}; + $protectedsettings = @{"storageAccountName" = $stoname; "storageAccountKey" = $stokey}; + Set-AzureVMExtension -ResourceGroupName $rgname -Location $loc -VMName $vmname -Name $extname -Publisher $publisher -Type $exttype -TypeHandlerVersion $extver -Settings $settings -ProtectedSettings $protectedsettings; + + + + + + + + + + + + + + + + + + -------------------------- Set Extension by String input -------------------------- + + PS C:\> + + + $rgname = "RG1" + $loc = "West US" + $vmname = "myVM" + + # Virtual Machine Extension + $extname = 'csetest'; + $publisher = 'Microsoft.Compute'; + $exttype = 'CustomScriptExtension'; + $extver = '1.1'; + + # Set extension settings by raw strings + $settingstr = '{"fileUris":[],"commandToExecute":""}'; + $protectedsettingstr = '{"storageAccountName":"' + $stoname + '","storageAccountKey":"' + $stokey + '"}'; + Set-AzureVMExtension -ResourceGroupName $rgname -Location $loc -VMName $vmname -Name $extname -Publisher $publisher -Type $exttype -TypeHandlerVersion $extver -SettingString $settingstr -ProtectedSettingString $protectedsettingstr; + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureVMOperatingSystem + + Set the OS properties for the VM + + + + + Set + AzureVMOperatingSystem + + + + This cmdlet allows you to set the OS properties such as login credentials, computer name etc. + + + + Set-AzureVMOperatingSystem + + VM + + The local VM object to set the OS properties on + + PSVirtualMachine + + + Windows + + Specify the type of OS is Windows + + SwitchParameter + + + ComputerName + + Name of the computer + + String + + + Credential + + PSCredential object that contains username and password for the VM + + PSCredential + + + ProvisionVMAgent + + Indicates that the VM agent should be installed on the VM + + SwitchParameter + + + + Set-AzureVMOperatingSystem + + VM + + The local VM object to set the OS properties on + + PSVirtualMachine + + + Linux + + Specify the type of OS is Linux + + SwitchParameter + + + ComputerName + + Name of the computer + + String + + + Credential + + PSCredential object that contains username and password for the VM + + PSCredential + + + ProvisionVMAgent + + Indicates that the VM agent should be installed on the VM + + SwitchParameter + + + SSHPublicKey + + SSH public key for the VM + + String[] + + + + + + VM + + The local VM object to set the OS properties on + + PSVirtualMachine + + PSVirtualMachine + + + + + + + Windows + + Specify the type of OS is Windows + + SwitchParameter + + SwitchParameter + + + + + + + ComputerName + + Name of the computer + + String + + String + + + + + + + Credential + + PSCredential object that contains username and password for the VM + + PSCredential + + PSCredential + + + + + + + ProvisionVMAgent + + Indicates that the VM agent should be installed on the VM + + SwitchParameter + + SwitchParameter + + + + + + + Linux + + Specify the type of OS is Linux + + SwitchParameter + + SwitchParameter + + + + + + + SSHPublicKey + + SSH public key for the VM + + String[] + + String[] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + PS C:\> + + + $user = "Foo12"; + $password = 'BaR@123'; + $securePassword = ConvertTo-SecureString $password -AsPlainText -Force; + $cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword); + $computerName = 'test2'; + + # Create the VM Profile + $vm = New-AzureVMConfig –VMName “myVM” -AvailabilitySetID $as1.Id –VMSize “Standard_A1" + + # Set OS properties + $vm = Set-AzureVMOperatingSystem -VM $vm -Windows -ComputerName $computerName -Credential $cred; + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureVMOSDisk + + Set the OS Disk properties on the VM + + + + + Set + AzureVMOSDisk + + + + Set the OS Disk properties on the VM + + + + Set-AzureVMOSDisk + + VM + + The local VM object to set the OS Disk properties on + + PSVirtualMachine + + + Name + + Name of the OS Disk + + String + + + VhdUri + + + For Image based VM Creation – + Specifies the VHD file that needs to be created when a platform image or user image is specified. This is where the image blob will be copied to start the VM from. + Example: http://contoso.blob.core.windows.net/System/ComputeVM/myImage/mydisk.vhd + + + For Disk based VM Boot scenario – + Specifies the VHD file that needs to be used directly (without copy) for booting up the VM. Applies to both OS and Data Disks. + + + String + + + Caching + + Specifies the caching mode of the operating system disk. This setting impacts the consistency and performance of the disk. Note: Changing this value causes the Virtual Machine to reboot. + + Possible values are: The default value is ReadWrite. + • ReadOnly + • ReadWrite + + + String + + + Windows + + Used in case of a user image based VM deployment to specify that the OS on the user image is Windows. + + SwitchParameter + + + + Set-AzureVMOSDisk + + VM + + The local VM object to set the OS Disk properties on + + PSVirtualMachine + + + Name + + Name of the OS Disk + + String + + + VhdUri + + + For Image based VM Creation – + Specifies the VHD file that needs to be created when a platform image or user image is specified. This is where the image blob will be copied to start the VM from. + Example: http://contoso.blob.core.windows.net/System/ComputeVM/myImage/mydisk.vhd + + + For Disk based VM Boot scenario – + Specifies the VHD file that needs to be used directly (without copy) for booting up the VM. Applies to both OS and Data Disks. + + + String + + + Caching + + Specifies the caching mode of the operating system disk. This setting impacts the consistency and performance of the disk. Note: Changing this value causes the Virtual Machine to reboot. + + Possible values are: The default value is ReadWrite. + • ReadOnly + • ReadWrite + + + String + + + Linux + + Used in case of a user image based VM deployment to specify that the OS on the user image is Linux. + + SwitchParameter + + + + + + VM + + The local VM object to set the OS Disk properties on + + PSVirtualMachine + + PSVirtualMachine + + + + + + + Name + + Name of the OS Disk + + String + + String + + + + + + + VhdUri + + + For Image based VM Creation – + Specifies the VHD file that needs to be created when a platform image or user image is specified. This is where the image blob will be copied to start the VM from. + Example: http://contoso.blob.core.windows.net/System/ComputeVM/myImage/mydisk.vhd + + + For Disk based VM Boot scenario – + Specifies the VHD file that needs to be used directly (without copy) for booting up the VM. Applies to both OS and Data Disks. + + + String + + String + + + + + + + Caching + + Specifies the caching mode of the operating system disk. This setting impacts the consistency and performance of the disk. Note: Changing this value causes the Virtual Machine to reboot. + + Possible values are: The default value is ReadWrite. + • ReadOnly + • ReadWrite + + + String + + String + + + + + + + Windows + + Used in case of a user image based VM deployment to specify that the OS on the user image is Windows. + + SwitchParameter + + SwitchParameter + + + + + + + Linux + + Used in case of a user image based VM deployment to specify that the OS on the user image is Linux. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + PS C:\> + + + $osDiskName = 'osDisk2'; + $osDiskCaching = 'ReadWrite'; + $osDiskVhdUri = "https://$stoname.blob.core.windows.net/test/os.vhd"; + + Set-AzureVMOSDisk -VM $vm -Name $osDiskName -VhdUri $osDiskVhdUri -Caching $osDiskCaching; + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureVMSourceImage + + Specify the Platform Image to be used for the VM + + + + + Set + AzureVMSourceImage + + + + Specify the Platform Image to be used for the VM + + + + Set-AzureVMSourceImage + + VM + + The local VM object to be configured + + PSVirtualMachine + + + Name + + Name of the Source Image + + String + + + DestinationVhdsContainer + + Container to be used for storing VHDs while creating a VM from platform image. Container will be created by CRP if it doesn’t exist already. + + String + + + + + + VM + + The local VM object to be configured + + PSVirtualMachine + + PSVirtualMachine + + + + + + + Name + + Name of the Source Image + + String + + String + + + + + + + DestinationVhdsContainer + + Container to be used for storing VHDs while creating a VM from platform image. Container will be created by CRP if it doesn’t exist already. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + PS C:\> + + + $vhdContainer = "https://$stoname.blob.core.windows.net/test"; + $img = 'a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201410.01-en.us-127GB.vhd'; + + Set-AzureVMSourceImage -VM $vm -Name $img -DestinationVhdsContainer $vhdContainer; + + + + + + + + + + + + + + + + + + + + + + + + Start-AzureVM + + Start a VM + + + + + Start + AzureVM + + + + This cmdlet allows you to start a VM + + + + Start-AzureVM + + ResourceGroupName + + Name of the Resource Group + + String + + + Name + + Name of the VM + + String + + + + + + ResourceGroupName + + Name of the Resource Group + + String + + String + + + + + + + Name + + Name of the VM + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + PS C:\> + + Start-AzureVM -ResourceGroupName "myRG" -Name "crpVM" + + + + + + + + + + + + + + + + + + + + + + + Stop-AzureVM + + Stop a VM + + + + + Stop + AzureVM + + + + This cmdlet allows you to Stop a VM + + + + Stop-AzureVM + + Force + + + + SwitchParameter + + + ResourceGroupName + + Name of the Resource Group + + String + + + Name + + Name of the VM + + String + + + + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + + ResourceGroupName + + Name of the Resource Group + + String + + String + + + + + + + Name + + Name of the VM + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + PS C:\> + + Stop-AzureVM -ResourceGroupName "myRG" -Name "crpVM" + + + + + + + + + + + + + + + + + + + + + + + Update-AzureVM + + Update the Azure VM state + + + + + Update + AzureVM + + + + This cmdlet allows you to update the Azure VM state with the state of the local VM object + + + + Update-AzureVM + + ResourceGroupName + + Name of the Resource Group + + String + + + VM + + The local VM object that contains the updating VM state + + PSVirtualMachine + + + Name + + Name of the VM + + String + + + + + + ResourceGroupName + + Name of the Resource Group + + String + + String + + + + + + + VM + + The local VM object that contains the updating VM state + + PSVirtualMachine + + PSVirtualMachine + + + + + + + Name + + Name of the VM + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + PS C:\> + + Update-AzureVM -ResourceGroupName "myRG" -Name "crpVM" –VM $vm + + + + + + + + + + + + + + + + + + + \ No newline at end of file