Before snapshotting a virtual machine, a few parameters/variables need to be set so they can be more easily referenced later. We need to set the resource group name, the location where the source virtual machine resides, and a name for the snapshot.
Run the following commands to set the parameters to create a snapshot of myVM3:
$resourceGroupName = 'VMLab'
$location = 'EastUS'
$vmName = 'myVM3'
$snapshotName = 'mySnapshot'
The preceding commands generate no output: