The first command gets the virtual machine named VirtualMachine07 by using the Get-AzVM cmdlet.
The command stores the virtual machine in the $VirtualMachine variable.
The second command removes the data disk named Disk3 from the virtual machine stored in $VirtualMachine.
The final command updates the state of the virtual machine stored in $VirtualMachine in ResourceGroup11.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
La source de ce contenu se trouve sur GitHub, où vous pouvez également créer et examiner les problèmes et les demandes de tirage. Pour plus d’informations, consultez notre guide du contributeur.