Or you can remove the parameter -Memory:$true
$VmsName = "My_Vm-1", "My_Vm-2", "My_vm-3"
$namesnap = "My_Snapshot_Name"
foreach ($vm in $VmsName) {
$data= Get-Date -Format g
$Nsnap= "$namesnap"+"_"+"$data"
write-host "Created Vm $($Vm) Snapshot Memory"
Get-vm -name "$Vm" | New-Snapshot -Name "$namesnap" -Description "$Nsnap"
}
Also, you can take virtual machine names from csv or txt file.
There are many examples in this community and on the Internet.