diff --git a/src/Compute/Compute/help/Disable-AzVmssDiskEncryption.md b/src/Compute/Compute/help/Disable-AzVmssDiskEncryption.md index 78f588ad2711..e0ada60c9fa0 100644 --- a/src/Compute/Compute/help/Disable-AzVmssDiskEncryption.md +++ b/src/Compute/Compute/help/Disable-AzVmssDiskEncryption.md @@ -24,12 +24,20 @@ Disables disk encryption on a VM scale set. ## EXAMPLES ### Example 1 -``` +```powershell PS C:\> Disable-AzVmssDiskEncryption -ResourceGroupName "Group001" -VMScaleSetName "VMSS001" ``` Disables disk encryption on the VM scale set named VMSS001 that belongs to the resource group named Group001. +### Example 2 + +Disables disk encryption on a VM scale set. (autogenerated) + +```powershell +Disable-AzVmssDiskEncryption -ResourceGroupName 'Group001' -VMScaleSetName 'VMSS001' -VolumeType OS +``` + ## PARAMETERS ### -AsJob diff --git a/src/Compute/Compute/help/Get-AzVMADDomainExtension.md b/src/Compute/Compute/help/Get-AzVMADDomainExtension.md index 9d0c6628f458..fdf26a698ff0 100644 --- a/src/Compute/Compute/help/Get-AzVMADDomainExtension.md +++ b/src/Compute/Compute/help/Get-AzVMADDomainExtension.md @@ -23,6 +23,14 @@ The **Get-AzVMADDomainExtension** cmdlet gets information about the specified Az ## EXAMPLES +### Example 1 + +Gets information about an AD domain extension. (autogenerated) + +```powershell +Get-AzVMADDomainExtension -Name 'AgentPool01' -ResourceGroupName myresourcegroup -VMName 'VM01' +``` + ## PARAMETERS ### -DefaultProfile diff --git a/src/Compute/Compute/help/Get-AzVMDiagnosticsExtension.md b/src/Compute/Compute/help/Get-AzVMDiagnosticsExtension.md index de85edf38852..5bba99aac185 100644 --- a/src/Compute/Compute/help/Get-AzVMDiagnosticsExtension.md +++ b/src/Compute/Compute/help/Get-AzVMDiagnosticsExtension.md @@ -24,12 +24,20 @@ The **Get-AzVMDiagnosticsExtension** cmdlet gets the settings of the Azure Diagn ## EXAMPLES ### Example 1: Get the diagnostics extension applied to a virtual machine -``` +```powershell PS C:\> Get-AzVMDiagnosticsExtension -ResourceGroupName "ResourceGroup11" -VMName "ContosoVM22" ``` This command gets the diagnostics extension applied to the virtual machine named ContosoVM22. +### Example 2 + +Gets the settings of the Diagnostics extension on a virtual machine. (autogenerated) + +```powershell +Get-AzVMDiagnosticsExtension -Name 'AgentPool01' -ResourceGroupName 'ResourceGroup11' -Status -VMName 'ContosoVM22' +``` + ## PARAMETERS ### -DefaultProfile diff --git a/src/Compute/Compute/help/Get-AzVMDscExtensionStatus.md b/src/Compute/Compute/help/Get-AzVMDscExtensionStatus.md index 0d7beb30b596..379e334e7d0d 100644 --- a/src/Compute/Compute/help/Get-AzVMDscExtensionStatus.md +++ b/src/Compute/Compute/help/Get-AzVMDscExtensionStatus.md @@ -24,6 +24,14 @@ When a configuration is applied this cmdlet produces output consistent with the ## EXAMPLES +### Example 1 + +Gets the status of the DSC extension handler for a virtual machine. (autogenerated) + +```powershell +Get-AzVMDscExtensionStatus -Name 'AgentPool01' -ResourceGroupName myresourcegroup -VMName 'VM01' +``` + ## PARAMETERS ### -DefaultProfile diff --git a/src/Compute/Compute/help/New-AzProximityPlacementGroup.md b/src/Compute/Compute/help/New-AzProximityPlacementGroup.md index 9427f5011687..8f805e58c011 100644 --- a/src/Compute/Compute/help/New-AzProximityPlacementGroup.md +++ b/src/Compute/Compute/help/New-AzProximityPlacementGroup.md @@ -24,7 +24,7 @@ This cmdlet will create Proximity Placement Group resource. ## EXAMPLES ### Example 1 -``` +```powershell PS C:\> New-AzureRmProximityPlacementGroup -ResourceGroupName $resourceGroupName -Name $proximityPlacementGroupName -Location $location -Tag @{key1 = "val1"} ResourceGroupName : rg0 @@ -38,6 +38,14 @@ Tags : {"key1":"val1"} This command creates a proximity place group in the given location. +### Example 2 + +Create Proximity Placement Group resource. (autogenerated) + +```powershell +New-AzProximityPlacementGroup -Location westus -Name 'AgentPool01' -ProximityPlacementGroupType -ResourceGroupName myresourcegroup +``` + ## PARAMETERS ### -AsJob diff --git a/src/Compute/Compute/help/New-AzSnapshotConfig.md b/src/Compute/Compute/help/New-AzSnapshotConfig.md index 303754db0176..ff9a8dfef6f7 100644 --- a/src/Compute/Compute/help/New-AzSnapshotConfig.md +++ b/src/Compute/Compute/help/New-AzSnapshotConfig.md @@ -28,7 +28,7 @@ The **New-AzSnapshotConfig** cmdlet creates a configurable snapshot object. ## EXAMPLES ### Example 1 -``` +```powershell PS C:\> $snapshotconfig = New-AzSnapshotConfig -Location 'Central US' -DiskSizeGB 5 -AccountType StandardLRS -OsType Windows -CreateOption Empty -EncryptionSettingsEnabled $true; PS C:\> $secretUrl = https://myvault.vault-int.azure-int.net/secrets/123/; PS C:\> $secretId = '/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.KeyVault/vaults/TestVault123'; @@ -43,6 +43,14 @@ The first command creates a local empty snapshot object with size 5GB in Standar The second and third commands set the disk encryption key and key encryption key settings for the snapshot object. The last command takes the snapshot object and creates a snapshot with name 'Snapshot01' in resource group 'ResourceGroup01'. +### Example 2 + +Creates a configurable snapshot object. (autogenerated) + +```powershell +New-AzSnapshotConfig -CreateOption Empty -Location 'Central US' -SourceUri 'https://contosoaccount.blob.core.windows.net/vhdstore/win7baseimage.vhd' +``` + ## PARAMETERS ### -CreateOption diff --git a/src/Compute/Compute/help/New-AzVMDataDisk.md b/src/Compute/Compute/help/New-AzVMDataDisk.md index 0d4c008ba7d2..9aa986066bbd 100644 --- a/src/Compute/Compute/help/New-AzVMDataDisk.md +++ b/src/Compute/Compute/help/New-AzVMDataDisk.md @@ -33,7 +33,7 @@ The **New-AzVMDataDisk** cmdlet creates a local data disk object for a virtual m ## EXAMPLES ### Example 1: Add a managed data disk to a Vmss VM. -``` +```powershell PS C:\> $disk = Get-AzDisk -ResourceGroupName $rgname -DiskName $diskname0 PS C:\> $datadisk = New-AzVMDataDisk -Caching 'ReadOnly' -Lun 2 -CreateOption Attach -StorageAccountType Standard_LRS -ManagedDiskId $disk.Id PS C:\> $VmssVM = Get-AzVmssVM -ResourceGroupName "myrg" -VMScaleSetName "myvmss" -InstanceId 0 @@ -45,6 +45,14 @@ The next command creates a data disk object with the managed disk. The next command gets an existing Vmss VM given by the resource group name, the vmss name and the instance ID. The final command updates the Vmss VM by adding a new data disk. +### Example 2 + +Creates a local data disk object for a virtual machine or a Vmss VM. (autogenerated) + +```powershell +New-AzVMDataDisk -Caching None -CreateOption Attach -DiskSizeInGB 1 -Lun 2 -Name 'AgentPool01' +``` + ## PARAMETERS ### -Caching diff --git a/src/Compute/Compute/help/New-AzVmssConfig.md b/src/Compute/Compute/help/New-AzVmssConfig.md index e97264ab0f61..2f27f85ee1d5 100644 --- a/src/Compute/Compute/help/New-AzVmssConfig.md +++ b/src/Compute/Compute/help/New-AzVmssConfig.md @@ -58,7 +58,7 @@ object. Other cmdlets are needed to configure the VMSS object. These cmdlets are ## EXAMPLES ### Example 1: Create a VMSS configuration object -``` +```powershell PS C:\> $VMSS = New-AzVmssConfig -Location $Loc -SkuCapacity 2 -SkuName "Standard_A0" -UpgradePolicyMode "Automatic" -NetworkInterfaceConfiguration $NetCfg ` | Add-AzVmssNetworkInterfaceConfiguration -Name "Test" -Primary $True -IPConfiguration $IPCfg ` | Set-AzVmssOSProfile -ComputerNamePrefix "Test" -AdminUsername $adminUsername -AdminPassword $AdminPassword ` @@ -76,6 +76,14 @@ This example creates a VMSS configuration object. The first command uses the variable named $VMSS. The second command uses the **New-AzVmss** cmdlet to create a VMSS that uses the VMSS configuration object created in the first command. +### Example 2 + +Creates a VMSS configuration object. (autogenerated) + +```powershell +New-AzVmssConfig -Location -Overprovision $false -SkuCapacity 2 -SkuName 'Standard_A0' -Tag 'Sql' -UpgradePolicyMode Automatic +``` + ## PARAMETERS ### -AutomaticRepairGracePeriod diff --git a/src/Compute/Compute/help/Remove-AzProximityPlacementGroup.md b/src/Compute/Compute/help/Remove-AzProximityPlacementGroup.md index 43ad2fbf1699..444e2205391a 100644 --- a/src/Compute/Compute/help/Remove-AzProximityPlacementGroup.md +++ b/src/Compute/Compute/help/Remove-AzProximityPlacementGroup.md @@ -36,12 +36,20 @@ This cmdlet will delete Proximity Placement Group resource. ## EXAMPLES ### Example 1 -``` +```powershell PS C:\> Get-AzureRmProximityPlacementGroup -ResourceGroupName $resourceGroupName -Name $proximityPlacementGroupName | Remove-AzureRmProximityPlacementGroup ``` This command removes the given proximity placement group. +### Example 2 + +This command removes the given proximity placement group. (autogenerated) + +```powershell +Remove-AzProximityPlacementGroup -Name 'AgentPool01' -ResourceGroupName myresourcegroup +``` + ## PARAMETERS ### -AsJob diff --git a/src/Compute/Compute/help/Remove-AzVMAccessExtension.md b/src/Compute/Compute/help/Remove-AzVMAccessExtension.md index 738c5bc83031..bda610cc9a17 100644 --- a/src/Compute/Compute/help/Remove-AzVMAccessExtension.md +++ b/src/Compute/Compute/help/Remove-AzVMAccessExtension.md @@ -23,6 +23,14 @@ The **Remove-AzVMAccessExtension** cmdlet removes the Virtual Machine Access (VM ## EXAMPLES +### Example 1 + +Removes the VMAccess extension from a virtual machine. (autogenerated) + +```powershell +Remove-AzVMAccessExtension -Name 'AgentPool01' -ResourceGroupName myresourcegroup -VMName 'VM01' +``` + ## PARAMETERS ### -DefaultProfile diff --git a/src/Compute/Compute/help/Remove-AzVMCustomScriptExtension.md b/src/Compute/Compute/help/Remove-AzVMCustomScriptExtension.md index 029002923aae..49242daf92c2 100644 --- a/src/Compute/Compute/help/Remove-AzVMCustomScriptExtension.md +++ b/src/Compute/Compute/help/Remove-AzVMCustomScriptExtension.md @@ -23,6 +23,14 @@ The **Remove-AzVMCustomScriptExtension** cmdlet removes a custom script Virtual ## EXAMPLES +### Example 1 + +Removes a custom script extension from a virtual machine. (autogenerated) + +```powershell +Remove-AzVMCustomScriptExtension -Name 'AgentPool01' -ResourceGroupName myresourcegroup -VMName 'VM01' +``` + ## PARAMETERS ### -DefaultProfile diff --git a/src/Compute/Compute/help/Set-AzVMAccessExtension.md b/src/Compute/Compute/help/Set-AzVMAccessExtension.md index bc643891b3ad..cdc61b04a6e9 100644 --- a/src/Compute/Compute/help/Set-AzVMAccessExtension.md +++ b/src/Compute/Compute/help/Set-AzVMAccessExtension.md @@ -26,13 +26,21 @@ The **Set-AzVMAccessExtension** cmdlet adds the Virtual Machine Access (VMAccess ## EXAMPLES ### Example 1: Add a VMAccess extension -``` +```powershell PS C:\> Set-AzVMAccessExtension -ResourceGroupName "ResourceGroup11" -Location "Central US" -VMName "VirtualMachine07" -Name "ContosoTest" -TypeHandlerVersion "2.4" -UserName "PFuller" -Password "Password" ``` This command adds a VMAccess extension for the virtual machine named VirtualMachine07 in ResourceGroup11. The command specifies the name and type handler version for VMAccess. +### Example 2 + +Adds the VMAccess extension to a virtual machine. (autogenerated) + +```powershell +Set-AzVMAccessExtension -Credential -Location 'Central US' -Name 'ContosoTest' -ResourceGroupName 'ResourceGroup11' -TypeHandlerVersion '2.4' -VMName 'VirtualMachine07' +``` + ## PARAMETERS ### -Credential diff --git a/src/Compute/Compute/help/Set-AzVMCustomScriptExtension.md b/src/Compute/Compute/help/Set-AzVMCustomScriptExtension.md index 2f7d788d2ddf..9feca718e2a5 100644 --- a/src/Compute/Compute/help/Set-AzVMCustomScriptExtension.md +++ b/src/Compute/Compute/help/Set-AzVMCustomScriptExtension.md @@ -88,13 +88,21 @@ This extension lets you run your own scripts on the virtual machine. ## EXAMPLES ### Example 1: Add a custom script -``` +```powershell PS C:\> Set-AzVMCustomScriptExtension -ResourceGroupName "ResourceGroup11" -Location "Central US" -VMName "VirtualMachine07" -Name "ContosoTest" -TypeHandlerVersion "1.1" -StorageAccountName "Contoso" -StorageAccountKey -FileName "ContosoScript.exe" -ContainerName "Scripts" ``` This command adds a custom script to the virtual machine named VirtualMachine07. The script file is contososcript.exe. +### Example 2 + +Adds a custom script extension to a virtual machine. (autogenerated) + +```powershell +Set-AzVMCustomScriptExtension -Argument -ContainerName 'Scripts' -DefaultProfile -FileName 'ContosoScript.exe' -Location 'Central US' -Name 'ContosoTest' -ResourceGroupName 'ResourceGroup11' -Run 'myScript.ps1' -SecureExecution -StorageAccountKey -StorageAccountName 'Contoso' -TypeHandlerVersion '1.1' -VMName 'VirtualMachine07' +``` + ## PARAMETERS ### -Argument diff --git a/src/Compute/Compute/help/Set-AzVMDataDisk.md b/src/Compute/Compute/help/Set-AzVMDataDisk.md index d18336ab73a3..0349e036127f 100644 --- a/src/Compute/Compute/help/Set-AzVMDataDisk.md +++ b/src/Compute/Compute/help/Set-AzVMDataDisk.md @@ -33,7 +33,7 @@ The **Set-AzVMDataDisk** cmdlet modifies properties of a virtual machine data di ## EXAMPLES ### Example 1: Modify the caching mode of a data disk -``` +```powershell PS C:\> $VM = Get-AzVM -ResourceGroupName "ResourceGroup11" -VMName "ContosoVM07" PS C:\> Set-AzVMDataDisk -VM $VM -Name "DataDisk01" -Caching ReadWrite | Update-AzVM ``` @@ -44,6 +44,14 @@ The second command modifies the caching mode for the data disk named DataDisk01 The command passes the result to the Update-AzVM cmdlet, which implements your changes. A change to the cashing mode causes the virtual machine to restart. +### Example 2 + +Modifies properties of a virtual machine data disk. (autogenerated) + +```powershell +Set-AzVMDataDisk -Caching None -Lun 1 -VM +``` + ## PARAMETERS ### -Caching diff --git a/src/Compute/Compute/help/Set-AzVmss.md b/src/Compute/Compute/help/Set-AzVmss.md index 3376edf6e807..1582015e2477 100644 --- a/src/Compute/Compute/help/Set-AzVmss.md +++ b/src/Compute/Compute/help/Set-AzVmss.md @@ -45,12 +45,20 @@ The only action this cmdlet supports is Reimage. ## EXAMPLES ### Example 1: Reimage a VMSS -``` +```powershell PS C:\> Set-AzVmss -Reimage -ResourceGroupName "ContosoGroup" -VMScaleSetName "ContosoVMSS" ``` This command reimages the VMSS named ContosoVMSS that belongs to the resource group named ContosoGroup. +### Example 2 + +Sets specific actions on a specified VMSS. (autogenerated) + +```powershell +Set-AzVmss -ReimageAll -ResourceGroupName 'ContosoGroup' -VMScaleSetName 'ContosoVMSS' +``` + ## PARAMETERS ### -AsJob diff --git a/src/Compute/Compute/help/Set-AzVmssVM.md b/src/Compute/Compute/help/Set-AzVmssVM.md index e0a1a8e1a3fe..da0d77d260c8 100644 --- a/src/Compute/Compute/help/Set-AzVmssVM.md +++ b/src/Compute/Compute/help/Set-AzVmssVM.md @@ -50,6 +50,14 @@ The **Set-AzVmssVM** cmdlet modifies the state of a Virtual Machine Scale Set (V ## EXAMPLES +### Example 1 + +Modifies the state of a VMSS instance. (autogenerated) + +```powershell +Set-AzVmssVM -InstanceId -Reimage -ResourceGroupName myresourcegroup -VMScaleSetName 'VMSS001' +``` + ## PARAMETERS ### -AsJob diff --git a/src/Compute/Compute/help/Update-AzVmssVM.md b/src/Compute/Compute/help/Update-AzVmssVM.md index 43ab35a12cd4..c528bccd5f21 100644 --- a/src/Compute/Compute/help/Update-AzVmssVM.md +++ b/src/Compute/Compute/help/Update-AzVmssVM.md @@ -40,7 +40,7 @@ Updates the state of a Vmss VM. For now, the only allowed update is adding a ma ## EXAMPLES ### Example 1: Add a managed data disk to a Vmss VM using New-AzVMDataDisk -``` +```powershell PS C:\> $disk = Get-AzDisk -ResourceGroupName $rgname -DiskName $diskname0 PS C:\> $datadisk = New-AzVMDataDisk -Caching 'ReadOnly' -Lun 2 -CreateOption Attach -StorageAccountType Standard_LRS -ManagedDiskId $disk.Id PS C:\> $VmssVM = Get-AzVmssVM -ResourceGroupName "myrg" -VMScaleSetName "myvmss" -InstanceId 0 @@ -53,7 +53,7 @@ The next command gets an existing Vmss VM given by the resource group name, the The final command updates the Vmss VM by adding a new data disk. ### Example 2: Add a managed data disk to a Vmss VM using Add-AzVMDataDisk -``` +```powershell PS C:\> $disk = Get-AzDisk -ResourceGroupName $rgname -DiskName $diskname0 PS C:\> $VmssVM = Get-AzVmssVM -ResourceGroupName "myrg" -VMScaleSetName "myvmss" -InstanceId 0 PS C:\> $VmssVM = Add-AzVMDataDisk -VirtualMachineScaleSetVM $VmssVM -Lun 0 -DiskSizeInGB 10 -CreateOption Attach -StorageAccountType Standard_LRS -ManagedDiskId $disk.Id @@ -65,6 +65,14 @@ The next command gets an existing Vmss VM given by the resource group name, the The next command adds the managed disk to the Vmss VM stored locally in $VmssVM. The final command updates the Vmss VM with added data disk. +### Example 3 + +Updates the state of a Vmss VM. (autogenerated) + +```powershell +Update-AzVmssVM -InstanceId 0 -ProtectFromScaleIn $false -ProtectFromScaleSetAction $false -ResourceGroupName 'myrg' -VMScaleSetName 'myvmss' +``` + ## PARAMETERS ### -AsJob