Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 180329

Snapshots older then 3 days on specific OS type

$
0
0

Hi,

Yes I know... I like to complicate my life. Due to the nature of the teams supporting different OS types in our infra I am looking for a powercli query which will provide a list of VM's for specific OS with snapshots older then 3 days,

 

I would like to get all *Windows* servers running snapshots older then 3 days, same with *Linux* for whole datecenter,

 

I already have queries to get snaps older then 3 days:

Get-VM | Get-Snapshot | Where {$_.Created -lt (Get-Date).AddDays(-3)} | Select-Object VM, Name, Created, SizeMB

 

... also a query which list the OS of the VM's

 

Get-VM | Get-View -Property @("Name", "Guest.GuestFullName") | Select -Property Name, @{N="Running OS";E={$_.Guest.GuestFullName}}

 

But really I have no idea how to combine them to work in a single query,

 

Help please !

Thanks !


Viewing all articles
Browse latest Browse all 180329

Trending Articles