Currently I have a script that I am running that queries our Virtual Machine Manager and lists all servers that have a current snapshot and the date it was created and it works great. As a matter of fact since we have our Vmware environment accessable from within Virtual machine Manager, we actually get a listing of all those snapshots too. One thing I would like to add in the script output would be to have a way for the exported data (its currently sent via an email) to actually list what host the VM resides on (so we can tell if its in Hyper-V or in Vcenter). Ive checked out the help for the command as well as searched the web but came up short.
Here is the snippit of code I was using:
Import-Module -Name "virtualmachinemanager"
# Connect to SCVMM Server
Get-VMMServer myservername
# Get Snapshots
$snapshots = Get-VMCheckpoint
# Check for existing Snapshots
if ($snapshots.count -gt 0){
# Create the List of Snapshots
$info = $snapshots | Format-Table VM, AddedTime, Name, -auto | Out-StringAny ideas what im misssing here or if its even possible?
Thanks!