Pages: [1]
Print
Author Topic: get vm name, decription, snapshot name, snapshot description  (Read 3627 times)
esarakaitis
Administrator
Sr. Member
*****
Posts: 256


8223109 sack57@hotmail.com littleking57 rootinfortwayne
View Profile WWW Email
« on: March 24, 2009, 08:18:33 AM »

Code:
Get-VM | Get-Snapshot | `
    Select @{Name="VM"; Expression={$_.VM.Name}},
           @{Name="VM_Description"; Expression={$_.VM.Description}},
           @{Name="Snapshot"; Expression={$_.Name}},
           @{Name="Snapshot_Description"; Expression={$_.Description}}
Logged
KristianW
Newbie
*
Posts: 32


View Profile
« Reply #1 on: March 26, 2009, 04:44:46 AM »


Added a little line to get snapshot creation date:

Code:
Get-VM | Get-Snapshot | `
Select  @{Name="VM"; Expression={$_.VM.Name}},
           @{Name="VM_Description"; Expression={$_.VM.Description}},
           @{Name="Snapshot"; Expression={$_.Name}},
           @{Name="Snapshot_Description"; Expression={$_.Description}},
           @{Name="Snapshot_Created"; Expression={$_.Created}}

And you could export it to what ever... (xml, csv)
Logged
esarakaitis
Administrator
Sr. Member
*****
Posts: 256


8223109 sack57@hotmail.com littleking57 rootinfortwayne
View Profile WWW Email
« Reply #2 on: March 26, 2009, 06:12:50 AM »

way to go, now your cookin
Logged
KristianW
Newbie
*
Posts: 32


View Profile
« Reply #3 on: March 26, 2009, 09:36:25 AM »

way to go, now your cookin

Hehe!

Just waiting for respons on my freshly sent email containing a list of 110 snapshots. Some of them "a few" months old.  (oldest from 2007). Shocked

whoppie.

Being a consultant rocks... Getting all the fun clean up jobs. Smiley
Logged
KristianW
Newbie
*
Posts: 32


View Profile
« Reply #4 on: March 30, 2010, 03:04:51 AM »

FYI

My script based on this is now REALLY slow. When I first ran it, some months back, it took 10 minutes. Now it uses more than one hour. I have been troubleshooting this, and came to the conclusion that get-snapshot cmdlet has had some dramatic performance issues after installing 4.0 U1.

I found some others that have experienced it on the vmware community site:

http://communities.vmware.com/thread/253169
Logged
esarakaitis
Administrator
Sr. Member
*****
Posts: 256


8223109 sack57@hotmail.com littleking57 rootinfortwayne
View Profile WWW Email
« Reply #5 on: March 30, 2010, 06:34:11 AM »

your absolutely correct, the get-snapshot command-let appears to be having some issues... I am experiencing the same results that you are.
Logged
Pages: [1]
Print
Jump to: