Skip to content

Aladdin generated examples for Compute #12257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/Compute/Compute/help/Disable-AzVmssDiskEncryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <!-- Aladdin Generated Example -->
Disable-AzVmssDiskEncryption -ResourceGroupName 'Group001' -VMScaleSetName 'VMSS001' -VolumeType OS
```

## PARAMETERS

### -AsJob
Expand Down
8 changes: 8 additions & 0 deletions src/Compute/Compute/help/Get-AzVMADDomainExtension.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <!-- Aladdin Generated Example -->
Get-AzVMADDomainExtension -Name 'AgentPool01' -ResourceGroupName myresourcegroup -VMName 'VM01'
```

## PARAMETERS

### -DefaultProfile
Expand Down
10 changes: 9 additions & 1 deletion src/Compute/Compute/help/Get-AzVMDiagnosticsExtension.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <!-- Aladdin Generated Example -->
Get-AzVMDiagnosticsExtension -Name 'AgentPool01' -ResourceGroupName 'ResourceGroup11' -Status -VMName 'ContosoVM22'
```

## PARAMETERS

### -DefaultProfile
Expand Down
8 changes: 8 additions & 0 deletions src/Compute/Compute/help/Get-AzVMDscExtensionStatus.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <!-- Aladdin Generated Example -->
Get-AzVMDscExtensionStatus -Name 'AgentPool01' -ResourceGroupName myresourcegroup -VMName 'VM01'
```

## PARAMETERS

### -DefaultProfile
Expand Down
10 changes: 9 additions & 1 deletion src/Compute/Compute/help/New-AzProximityPlacementGroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 <!-- Aladdin Generated Example -->
New-AzProximityPlacementGroup -Location westus -Name 'AgentPool01' -ProximityPlacementGroupType <String> -ResourceGroupName myresourcegroup
```

## PARAMETERS

### -AsJob
Expand Down
10 changes: 9 additions & 1 deletion src/Compute/Compute/help/New-AzSnapshotConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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 <!-- Aladdin Generated Example -->
New-AzSnapshotConfig -CreateOption Empty -Location 'Central US' -SourceUri 'https://contosoaccount.blob.core.windows.net/vhdstore/win7baseimage.vhd'
```

## PARAMETERS

### -CreateOption
Expand Down
10 changes: 9 additions & 1 deletion src/Compute/Compute/help/New-AzVMDataDisk.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 <!-- Aladdin Generated Example -->
New-AzVMDataDisk -Caching None -CreateOption Attach -DiskSizeInGB 1 -Lun 2 -Name 'AgentPool01'
```

## PARAMETERS

### -Caching
Expand Down
10 changes: 9 additions & 1 deletion src/Compute/Compute/help/New-AzVmssConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `
Expand All @@ -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 <!-- Aladdin Generated Example -->
New-AzVmssConfig -Location <String> -Overprovision $false -SkuCapacity 2 -SkuName 'Standard_A0' -Tag 'Sql' -UpgradePolicyMode Automatic
```

## PARAMETERS

### -AutomaticRepairGracePeriod
Expand Down
10 changes: 9 additions & 1 deletion src/Compute/Compute/help/Remove-AzProximityPlacementGroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <!-- Aladdin Generated Example -->
Remove-AzProximityPlacementGroup -Name 'AgentPool01' -ResourceGroupName myresourcegroup
```

## PARAMETERS

### -AsJob
Expand Down
8 changes: 8 additions & 0 deletions src/Compute/Compute/help/Remove-AzVMAccessExtension.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <!-- Aladdin Generated Example -->
Remove-AzVMAccessExtension -Name 'AgentPool01' -ResourceGroupName myresourcegroup -VMName 'VM01'
```

## PARAMETERS

### -DefaultProfile
Expand Down
8 changes: 8 additions & 0 deletions src/Compute/Compute/help/Remove-AzVMCustomScriptExtension.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <!-- Aladdin Generated Example -->
Remove-AzVMCustomScriptExtension -Name 'AgentPool01' -ResourceGroupName myresourcegroup -VMName 'VM01'
```

## PARAMETERS

### -DefaultProfile
Expand Down
10 changes: 9 additions & 1 deletion src/Compute/Compute/help/Set-AzVMAccessExtension.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <!-- Aladdin Generated Example -->
Set-AzVMAccessExtension -Credential <PSCredential> -Location 'Central US' -Name 'ContosoTest' -ResourceGroupName 'ResourceGroup11' -TypeHandlerVersion '2.4' -VMName 'VirtualMachine07'
```

## PARAMETERS

### -Credential
Expand Down
10 changes: 9 additions & 1 deletion src/Compute/Compute/help/Set-AzVMCustomScriptExtension.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <StorageKey> -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 <!-- Aladdin Generated Example -->
Set-AzVMCustomScriptExtension -Argument <String> -ContainerName 'Scripts' -DefaultProfile <IAzureContextContainer> -FileName 'ContosoScript.exe' -Location 'Central US' -Name 'ContosoTest' -ResourceGroupName 'ResourceGroup11' -Run 'myScript.ps1' -SecureExecution -StorageAccountKey <String> -StorageAccountName 'Contoso' -TypeHandlerVersion '1.1' -VMName 'VirtualMachine07'
```

## PARAMETERS

### -Argument
Expand Down
10 changes: 9 additions & 1 deletion src/Compute/Compute/help/Set-AzVMDataDisk.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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 <!-- Aladdin Generated Example -->
Set-AzVMDataDisk -Caching None -Lun 1 -VM <PSVirtualMachine>
```

## PARAMETERS

### -Caching
Expand Down
10 changes: 9 additions & 1 deletion src/Compute/Compute/help/Set-AzVmss.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <!-- Aladdin Generated Example -->
Set-AzVmss -ReimageAll -ResourceGroupName 'ContosoGroup' -VMScaleSetName 'ContosoVMSS'
```

## PARAMETERS

### -AsJob
Expand Down
8 changes: 8 additions & 0 deletions src/Compute/Compute/help/Set-AzVmssVM.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <!-- Aladdin Generated Example -->
Set-AzVmssVM -InstanceId <String> -Reimage -ResourceGroupName myresourcegroup -VMScaleSetName 'VMSS001'
```

## PARAMETERS

### -AsJob
Expand Down
12 changes: 10 additions & 2 deletions src/Compute/Compute/help/Update-AzVmssVM.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 <!-- Aladdin Generated Example -->
Update-AzVmssVM -InstanceId 0 -ProtectFromScaleIn $false -ProtectFromScaleSetAction $false -ResourceGroupName 'myrg' -VMScaleSetName 'myvmss'
```

## PARAMETERS

### -AsJob
Expand Down