Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Using Get-VMCheckpoint to list existing Checkpoints in Hyper-V

$
0
0

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-String

Any ideas what im misssing here or if its even possible?

Thanks!



Viewing all articles
Browse latest Browse all 15028

Trending Articles