Skip to content

Commit b9513b1

Browse files
authored
Updating help docs for VM and Vmss cmdlets as there are missing parameters (#22375)
* help doc and changelog * example fix
1 parent 1d361a1 commit b9513b1

File tree

7 files changed

+328
-45
lines changed

7 files changed

+328
-45
lines changed

src/Compute/Compute/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
-->
2222
## Upcoming Release
2323
* Fixed the `Update-AzVmss` cmdlet so the `AutomaticRepairGracePeriod`, `AutomaticRepairAction`, and `EnableAutomaticRepair` parameters function correctly.
24+
* Updated help doc for `New-AzVM`, `New-AzVMConfig`, `New-AzVmss`, `New-AzVmssConfig`, `Update-AzVM`, and `Update-AzVmss` to include parameters that were previously added for Trusted Launch features.
2425

2526
## Version 6.1.0
2627
* Added useful examples to the `New-AzVMConfig` help doc.

src/Compute/Compute/help/New-AzVM.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ New-AzVM [[-ResourceGroupName] <String>] [[-Location] <String>] [-EdgeZone <Stri
2727
[-HostGroupId <String>] [-SshKeyName <String>] [-GenerateSshKey] [-CapacityReservationGroupId <String>]
2828
[-UserData <String>] [-ImageReferenceId <String>] [-PlatformFaultDomain <Int32>] [-HibernationEnabled]
2929
[-vCPUCountAvailable <Int32>] [-vCPUCountPerCore <Int32>] [-DiskControllerType <String>]
30-
[-SharedGalleryImageId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
30+
[-SharedGalleryImageId <String>] [-SecurityType <String>] [-EnableVtpm <Boolean>]
31+
[-EnableSecureBoot <Boolean>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
3132
[<CommonParameters>]
3233
```
3334

@@ -618,6 +619,21 @@ Accept pipeline input: True (ByPropertyName)
618619
Accept wildcard characters: False
619620
```
620621

622+
### -EnableSecureBoot
623+
Specifies whether secure boot should be enabled on the virtual machine.
624+
625+
```yaml
626+
Type: System.Nullable`1[System.Boolean]
627+
Parameter Sets: SimpleParameterSet
628+
Aliases:
629+
630+
Required: False
631+
Position: Named
632+
Default value: None
633+
Accept pipeline input: True (ByPropertyName)
634+
Accept wildcard characters: False
635+
```
636+
621637
### -EnableUltraSSD
622638
Use UltraSSD disks for the vm.
623639
@@ -633,6 +649,21 @@ Accept pipeline input: False
633649
Accept wildcard characters: False
634650
```
635651
652+
### -EnableVtpm
653+
Specifies whether vTPM should be enabled on the virtual machine.
654+
655+
```yaml
656+
Type: System.Nullable`1[System.Boolean]
657+
Parameter Sets: SimpleParameterSet
658+
Aliases:
659+
660+
Required: False
661+
Position: Named
662+
Default value: None
663+
Accept pipeline input: True (ByPropertyName)
664+
Accept wildcard characters: False
665+
```
666+
636667
### -EncryptionAtHost
637668
EncryptionAtHost property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set.
638669
This will enable the encryption for all the disks including Resource/Temp disk at host itself.
@@ -1015,6 +1046,22 @@ Accept pipeline input: False
10151046
Accept wildcard characters: False
10161047
```
10171048
1049+
### -SecurityType
1050+
Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. By default, UefiSettings will not be enabled unless this property is set.
1051+
1052+
```yaml
1053+
Type: System.String
1054+
Parameter Sets: SimpleParameterSet
1055+
Aliases:
1056+
Accepted values: TrustedLaunch, ConfidentialVM
1057+
1058+
Required: False
1059+
Position: Named
1060+
Default value: None
1061+
Accept pipeline input: True (ByPropertyName)
1062+
Accept wildcard characters: False
1063+
```
1064+
10181065
### -SharedGalleryImageId
10191066
Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.
10201067

src/Compute/Compute/help/New-AzVMConfig.md

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ New-AzVMConfig [-VMName] <String> [-VMSize] <String> [[-AvailabilitySetId] <Stri
2121
[-EncryptionAtHost] [-CapacityReservationGroupId <String>] [-ImageReferenceId <String>]
2222
[-DiskControllerType <String>] [-UserData <String>] [-PlatformFaultDomain <Int32>] [-HibernationEnabled]
2323
[-vCPUCountAvailable <Int32>] [-vCPUCountPerCore <Int32>] [-SharedGalleryImageId <String>]
24+
[-SecurityType <String>] [-EnableVtpm <Boolean>] [-EnableSecureBoot <Boolean>]
2425
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2526
```
2627

@@ -32,8 +33,8 @@ New-AzVMConfig [-VMName] <String> [-VMSize] <String> [[-AvailabilitySetId] <Stri
3233
[-EvictionPolicy <String>] [-Priority <String>] [-Tags <Hashtable>] [-EnableUltraSSD] [-EncryptionAtHost]
3334
[-CapacityReservationGroupId <String>] [-ImageReferenceId <String>] [-DiskControllerType <String>]
3435
[-UserData <String>] [-PlatformFaultDomain <Int32>] [-HibernationEnabled] [-vCPUCountAvailable <Int32>]
35-
[-vCPUCountPerCore <Int32>] [-SharedGalleryImageId <String>] [-DefaultProfile <IAzureContextContainer>]
36-
[<CommonParameters>]
36+
[-vCPUCountPerCore <Int32>] [-SharedGalleryImageId <String>] [-SecurityType <String>] [-EnableVtpm <Boolean>]
37+
[-EnableSecureBoot <Boolean>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
3738
```
3839

3940
## DESCRIPTION
@@ -95,7 +96,6 @@ $vmconfig = Set-AzVMOperatingSystem -VM $vmconfig -Windows -ComputerName $comput
9596
# Create the VM
9697
New-AzVM -ResourceGroupName $rgname -Location $loc -Vm $vmconfig;
9798
$vm = Get-AzVM -ResourceGroupName $rgname -Name $vmname;
98-
9999
```
100100

101101
### Example 2: Create a virtual machine object in a virtual machine scale set with fault domains setup
@@ -149,7 +149,6 @@ Add-AzVMNetworkInterface -VM $vmConfig -Id $nic.Id;
149149
150150
New-AzVM -ResourceGroupName $RGName -Location $loc -VM $vmConfig;
151151
$vm = Get-AzVM -ResourceGroupName $rgname -Name $vmName;
152-
153152
```
154153

155154
### Example 2: Create a VM using Virtual Machine Config object for TrustedLaunch Secuirty Type, flags Vtpm and Secure Boot are set to True by default.
@@ -275,6 +274,21 @@ Accept pipeline input: False
275274
Accept wildcard characters: False
276275
```
277276
277+
### -EnableSecureBoot
278+
Specifies whether secure boot should be enabled on the virtual machine.
279+
280+
```yaml
281+
Type: System.Nullable`1[System.Boolean]
282+
Parameter Sets: (All)
283+
Aliases:
284+
285+
Required: False
286+
Position: Named
287+
Default value: None
288+
Accept pipeline input: True (ByPropertyName)
289+
Accept wildcard characters: False
290+
```
291+
278292
### -EnableUltraSSD
279293
Enables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM.
280294
Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine only if this property is enabled.
@@ -292,6 +306,21 @@ Accept pipeline input: True (ByPropertyName)
292306
Accept wildcard characters: False
293307
```
294308
309+
### -EnableVtpm
310+
Specifies whether vTPM should be enabled on the virtual machine.
311+
312+
```yaml
313+
Type: System.Nullable`1[System.Boolean]
314+
Parameter Sets: (All)
315+
Aliases:
316+
317+
Required: False
318+
Position: Named
319+
Default value: None
320+
Accept pipeline input: True (ByPropertyName)
321+
Accept wildcard characters: False
322+
```
323+
295324
### -EncryptionAtHost
296325
EncryptionAtHost property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set.
297326
This will enable the encryption for all the disks including Resource/Temp disk at host itself.
@@ -486,6 +515,22 @@ Accept pipeline input: True (ByPropertyName)
486515
Accept wildcard characters: False
487516
```
488517
518+
### -SecurityType
519+
Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. By default, UefiSettings will not be enabled unless this property is set.
520+
521+
```yaml
522+
Type: System.String
523+
Parameter Sets: (All)
524+
Aliases:
525+
Accepted values: TrustedLaunch, ConfidentialVM
526+
527+
Required: False
528+
Position: Named
529+
Default value: None
530+
Accept pipeline input: True (ByPropertyName)
531+
Accept wildcard characters: False
532+
```
533+
489534
### -SharedGalleryImageId
490535
Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.
491536

src/Compute/Compute/help/New-AzVmss.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ New-AzVmss [[-ResourceGroupName] <String>] [-VMScaleSetName] <String> [-AsJob] [
3535
[-Priority <String>] [-EvictionPolicy <String>] [-MaxPrice <Double>] [-ScaleInPolicy <String[]>]
3636
[-SkipExtensionsOnOverprovisionedVMs] [-EncryptionAtHost] [-PlatformFaultDomainCount <Int32>]
3737
[-OrchestrationMode <String>] [-CapacityReservationGroupId <String>] [-ImageReferenceId <String>]
38-
[-DiskControllerType <String>] [-SharedGalleryImageId <String>] [-DefaultProfile <IAzureContextContainer>]
38+
[-DiskControllerType <String>] [-SharedGalleryImageId <String>] [-SecurityType <String>]
39+
[-EnableVtpm <Boolean>] [-EnableSecureBoot <Boolean>] [-DefaultProfile <IAzureContextContainer>]
3940
[-SinglePlacementGroup] [-WhatIf] [-Confirm] [<CommonParameters>]
4041
```
4142

@@ -274,6 +275,7 @@ $result = New-AzVmss -Credential $vmCred -VMScaleSetName $vmssName1 -ImageName $
274275
# $result.VirtualMachineProfile.SecurityProfile.UefiSettings.VTpmEnabled $true;
275276
# $result.VirtualMachineProfile.SecurityProfile.UefiSettings.SecureBootEnabled $true;
276277
```
278+
277279
This example Creates a new VMSS with the new Security Type 'TrustedLaunch'.
278280

279281
## PARAMETERS
@@ -469,6 +471,21 @@ Accept pipeline input: True (ByPropertyName)
469471
Accept wildcard characters: False
470472
```
471473

474+
### -EnableSecureBoot
475+
Specifies whether secure boot should be enabled on the virtual machine.
476+
477+
```yaml
478+
Type: System.Nullable`1[System.Boolean]
479+
Parameter Sets: SimpleParameterSet
480+
Aliases:
481+
482+
Required: False
483+
Position: Named
484+
Default value: None
485+
Accept pipeline input: True (ByPropertyName)
486+
Accept wildcard characters: False
487+
```
488+
472489
### -EnableUltraSSD
473490
Use UltraSSD disks for the VMs in the scale set.
474491
@@ -484,6 +501,21 @@ Accept pipeline input: False
484501
Accept wildcard characters: False
485502
```
486503
504+
### -EnableVtpm
505+
Specifies whether vTPM should be enabled on the virtual machine.
506+
507+
```yaml
508+
Type: System.Nullable`1[System.Boolean]
509+
Parameter Sets: SimpleParameterSet
510+
Aliases:
511+
512+
Required: False
513+
Position: Named
514+
Default value: None
515+
Accept pipeline input: True (ByPropertyName)
516+
Accept wildcard characters: False
517+
```
518+
487519
### -EncryptionAtHost
488520
This parameter will enable the encryption for all the disks including Resource/Temp disk at host itself.
489521
Default: The Encryption at host will be disabled unless this property is set to true for the resource.
@@ -785,6 +817,22 @@ Accept pipeline input: False
785817
Accept wildcard characters: False
786818
```
787819
820+
### -SecurityType
821+
Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. UefiSettings will not be enabled unless this property is set.
822+
823+
```yaml
824+
Type: System.String
825+
Parameter Sets: SimpleParameterSet
826+
Aliases:
827+
Accepted values: TrustedLaunch, ConfidentialVM
828+
829+
Required: False
830+
Position: Named
831+
Default value: None
832+
Accept pipeline input: True (ByPropertyName)
833+
Accept wildcard characters: False
834+
```
835+
788836
### -SharedGalleryImageId
789837
Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.
790838

src/Compute/Compute/help/New-AzVmssConfig.md

Lines changed: 53 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ New-AzVmssConfig [[-Overprovision] <Boolean>] [[-Location] <String>] [-EdgeZone
3131
[-CapacityReservationGroupId <String>] [-UserData <String>] [-AutomaticRepairAction <String>]
3232
[-BaseRegularPriorityCount <Int32>] [-RegularPriorityPercentage <Int32>] [-ImageReferenceId <String>]
3333
[-SharedGalleryImageId <String>] [-OSImageScheduledEventEnabled]
34-
[-OSImageScheduledEventNotBeforeTimeoutInMinutes <String>] [-DefaultProfile <IAzureContextContainer>]
35-
[-WhatIf] [-Confirm] [<CommonParameters>]
34+
[-OSImageScheduledEventNotBeforeTimeoutInMinutes <String>] [-SecurityType <String>] [-EnableVtpm <Boolean>]
35+
[-EnableSecureBoot <Boolean>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
36+
[<CommonParameters>]
3637
```
3738

3839
### ExplicitIdentityParameterSet
@@ -53,8 +54,9 @@ New-AzVmssConfig [[-Overprovision] <Boolean>] [[-Location] <String>] [-EdgeZone
5354
[-OrchestrationMode <String>] [-CapacityReservationGroupId <String>] [-UserData <String>]
5455
[-AutomaticRepairAction <String>] [-BaseRegularPriorityCount <Int32>] [-RegularPriorityPercentage <Int32>]
5556
[-ImageReferenceId <String>] [-SharedGalleryImageId <String>] [-OSImageScheduledEventEnabled]
56-
[-OSImageScheduledEventNotBeforeTimeoutInMinutes <String>] [-DefaultProfile <IAzureContextContainer>]
57-
[-WhatIf] [-Confirm] [<CommonParameters>]
57+
[-OSImageScheduledEventNotBeforeTimeoutInMinutes <String>] [-SecurityType <String>] [-EnableVtpm <Boolean>]
58+
[-EnableSecureBoot <Boolean>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
59+
[<CommonParameters>]
5860
```
5961

6062
## DESCRIPTION
@@ -156,12 +158,11 @@ $result = New-AzVmss -ResourceGroupName $rgname -Name $vmssName -VirtualMachineS
156158
$vmss = Get-AzVmss -ResourceGroupName $rgname -VMScaleSetName $vmssName;
157159
# $vmss.VirtualMachineProfile.ScheduledEventsProfile.OsImageNotificationProfile.Enable is the OSImageScheduledEventEnabled flag.
158160
# $vmss.VirtualMachineProfile.ScheduledEventsProfile.OsImageNotificationProfile.NotBeforeTimeout is the timeout value 'PT15M'.
159-
160161
```
161162

162163
### Example 5: Create a Vmss with the security type TrustedLaunch
163164
```powershell
164-
$rgname = "rganme";
165+
$rgname = "rganme";
165166
$loc = "eastus";
166167
New-AzResourceGroup -Name $rgname -Location $loc -Force;
167168
# VMSS Profile & Hardware requirements for the TrustedLaunch default behavior.
@@ -209,7 +210,6 @@ $vmssGet = Get-AzVmss -ResourceGroupName $rgname -VMScaleSetName $vmssName1;
209210
# Validate that for -SecurityType "TrustedLaunch" "-Vtpm" and -"SecureBoot" are "Enabled/true"
210211
#$vmssGet.VirtualMachineProfile.SecurityProfile.UefiSettings.VTpmEnabled $true;
211212
#$vmssGet.VirtualMachineProfile.SecurityProfile.UefiSettings.SecureBootEnabled $true;
212-
213213
```
214214

215215
This example Creates a new VMSS using VMSSConfig object for the Trusted Launch Security Type and validates flags SecureBoot and Vtpm as True by default.
@@ -366,6 +366,21 @@ Accept pipeline input: True (ByPropertyName)
366366
Accept wildcard characters: False
367367
```
368368
369+
### -EnableSecureBoot
370+
Specifies whether secure boot should be enabled on the virtual machine.
371+
372+
```yaml
373+
Type: System.Nullable`1[System.Boolean]
374+
Parameter Sets: (All)
375+
Aliases:
376+
377+
Required: False
378+
Position: Named
379+
Default value: None
380+
Accept pipeline input: True (ByPropertyName)
381+
Accept wildcard characters: False
382+
```
383+
369384
### -EnableSpotRestore
370385
Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based on capacity availability and pricing constraints
371386
@@ -397,6 +412,21 @@ Accept pipeline input: True (ByPropertyName)
397412
Accept wildcard characters: False
398413
```
399414
415+
### -EnableVtpm
416+
Specifies whether vTPM should be enabled on the virtual machine.
417+
418+
```yaml
419+
Type: System.Nullable`1[System.Boolean]
420+
Parameter Sets: (All)
421+
Aliases:
422+
423+
Required: False
424+
Position: Named
425+
Default value: None
426+
Accept pipeline input: True (ByPropertyName)
427+
Accept wildcard characters: False
428+
```
429+
400430
### -EncryptionAtHost
401431
This parameter will enable the encryption for all the disks including Resource/Temp disk at host itself. Default: The Encryption at host will be disabled unless this property is set to true for the resource.
402432
@@ -803,6 +833,22 @@ Accept pipeline input: True (ByPropertyName)
803833
Accept wildcard characters: False
804834
```
805835
836+
### -SecurityType
837+
Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. Default: UefiSettings will not be enabled unless this property is set.
838+
839+
```yaml
840+
Type: System.String
841+
Parameter Sets: (All)
842+
Aliases:
843+
Accepted values: TrustedLaunch, ConfidentialVM
844+
845+
Required: False
846+
Position: Named
847+
Default value: None
848+
Accept pipeline input: True (ByPropertyName)
849+
Accept wildcard characters: False
850+
```
851+
806852
### -SharedGalleryImageId
807853
Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.
808854

0 commit comments

Comments
 (0)