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.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.