Skip to content

Aladdin generated examples for Compute #12221

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

Closed
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-AzAvailabilitySet.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,20 @@ The **New-AzAvailabilitySet** cmdlet creates an Azure availability set.
## EXAMPLES

### Example 1: Create an availability set
```
```powershell
PS C:\> New-AzAvailabilitySet -ResourceGroupName "ResourceGroup11" -Name "AvailabilitySet03" -Location "West US"
```

This command creates an availability set named AvailabilitySet03 in the resource group named ResourceGroup11.

### Example 2

Creates an Azure availability set. (autogenerated)

```powershell <!-- Aladdin Generated Example -->
New-AzAvailabilitySet -Location 'West US' -Name 'AvailabilitySet03' -PlatformFaultDomainCount <Int32> -PlatformUpdateDomainCount <Int32> -ResourceGroupName 'ResourceGroup11' -Sku <String>
```

## PARAMETERS

### -AsJob
Expand Down
10 changes: 9 additions & 1 deletion src/Compute/Compute/help/New-AzHost.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This cmdlet will create a Host.
## EXAMPLES

### Example 1
```
```powershell
PS C:\> New-AzHost -ResourceGroupName $resourceGroupName -HostGroupName $hostGroupName -Name $hostName -Location $location -Sku $skuName

ResourceGroupName : myrg01
Expand All @@ -44,6 +44,14 @@ Tags : {"key1":"val2"}

This command creates a host of the given Sku in the given host group and the given location.

### Example 2

Creates a host. (autogenerated)

```powershell <!-- Aladdin Generated Example -->
New-AzHost -AutoReplaceOnFailure $false -HostGroupName <String> -Location <String> -Name <String> -PlatformFaultDomain <Int32> -ResourceGroupName <String> -Sku <String>
Comment on lines +51 to +52
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should omit examples where less than 50% of the specified parameters have actual values. Specifying the type for all of the parameters doesn't provide much value as the syntax can already be obtained from the cmdlet.

```

## PARAMETERS

### -AsJob
Expand Down
10 changes: 9 additions & 1 deletion src/Compute/Compute/help/New-AzHostGroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This cmdlet will create a Host group.
## EXAMPLES

### Example 1
```
```powershell
PS C:\> New-AzHostGroup -ResourceGroupName $resourceGroupName -Name $hostGroupName -Location $location -Zone $zone

ResourceGroupName : myrg01
Expand All @@ -39,6 +39,14 @@ Tags : {[key1, val1]}

This command creates a host group in the given location and zone.

### Example 2

Creates a host group. (autogenerated)

```powershell <!-- Aladdin Generated Example -->
New-AzHostGroup -Location <String> -Name <String> -PlatformFaultDomain <Int32> -ResourceGroupName <String>
```
Comment on lines +46 to +48
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should omit examples where less than 50% of the specified parameters have actual values. Specifying the type for all of the parameters doesn't provide much value as the syntax can already be obtained from the cmdlet.


## PARAMETERS

### -AsJob
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-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
8 changes: 8 additions & 0 deletions src/Compute/Compute/help/Remove-AzVMNetworkInterface.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ The **Remove-AzVMNetworkInterface** cmdlet removes a network interface from a vi

## EXAMPLES

### Example 1

Removes a network interface from a virtual machine. (autogenerated)

```powershell <!-- Aladdin Generated Example -->
Remove-AzVMNetworkInterface -NetworkInterfaceIDs <String[]> -VM <PSVirtualMachine>
```

## PARAMETERS

### -DefaultProfile
Expand Down
10 changes: 9 additions & 1 deletion src/Compute/Compute/help/Remove-AzVMSecret.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@ The Remove-AzVMSecret cmdlet removes (a) secret(s) from a virtual machine object
## EXAMPLES

### Example 1
```
```powershell
PS C:\> Get-AzVM -ResourceGroupName "rg1" -Name "vm1" | Remove-AzVMSecret | Update-AzVM
```

Removes all secrets from a virtual machine "vm1" in resource group "rg1" and update the VM

### Example 2

Removes (a) secret(s) from a virtual machine object. (autogenerated)

```powershell <!-- Aladdin Generated Example -->
Remove-AzVMSecret -SourceVaultId <String[]> -VM <PSVirtualMachine>
```

## PARAMETERS

### -DefaultProfile
Expand Down
8 changes: 8 additions & 0 deletions src/Compute/Compute/help/Remove-AzVmssVMDataDisk.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ The first command getsan existing Vmss VM given by the resource group name, the
The second command removes the data disk lun 0 from the VM scale set VM stored in $VmssVM
The final command updates the Vmss VM with removed data disk.

### Example 2

The first command getsan existing Vmss VM given by the resource group name, the vmss name and the instance ID.

```powershell <!-- Aladdin Generated Example -->
Remove-AzVmssVMDataDisk -Lun 0 -VirtualMachineScaleSetVM <PSVirtualMachineScaleSetVM>
```

## PARAMETERS

### -DefaultProfile
Expand Down
8 changes: 8 additions & 0 deletions src/Compute/Compute/help/Set-AzVMADDomainExtension.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ This extension lets your virtual machine join a domain.

## EXAMPLES

### Example 1

Adds an AD domain extension to a virtual machine. (autogenerated)

```powershell <!-- Aladdin Generated Example -->
Set-AzVMADDomainExtension -Credential <PSCredential> -DefaultProfile <IAzureContextContainer> -DomainName <String> -JoinOption <UInt32> -ResourceGroupName myresourcegroup -VMName 'VM01'
```

## PARAMETERS

### -Credential
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-AzVMBootDiagnostic.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The **Set-AzVMBootDiagnostic** cmdlet modifies boot diagnostics properties of a
## EXAMPLES

### Example 1: Enable boot diagnostics
```
```powershell
PS C:\> $VM = Get-AzVM -ResourceGroupName "ResourceGroup11" -Name "ContosoVM07"
PS C:\> Set-AzVMBootDiagnostic -VM $VM -Enable -ResourceGroupName "ResourceGroup11" -StorageAccountName "DiagnosticStorage"
```
Expand All @@ -41,6 +41,14 @@ The command stores it in the $VM variable.
The second command enables boot diagnostics for the virtual machine in $VM.
Diagnostics data is stored in the specified account.

### Example 2

Modifies boot diagnostics properties of a virtual machine. (autogenerated)

```powershell <!-- Aladdin Generated Example -->
Set-AzVMBootDiagnostic -Disable -VM <PSVirtualMachine>
```

## PARAMETERS

### -DefaultProfile
Expand Down
Loading