Try the following command.
$vm = Get-AzVM -VMName <VmName>
$vm.StorageProfile.ImageReference
This will give you some more details as below example
Publisher : MicrosoftWindowsServer
Offer : WindowsServer
Sku : 2016-Datacenter
Version : latest
ExactVersion : 14393.4225.2102030345
Hope this helps