Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sorting by snashot size not working #708

Open
pratikprays opened this issue Apr 15, 2020 · 1 comment
Open

sorting by snashot size not working #708

pratikprays opened this issue Apr 15, 2020 · 1 comment

Comments

@pratikprays
Copy link

pratikprays commented Apr 15, 2020

unable to sort by snapshot Size in snapshot information plugin.it is sorting by default by VM name even after sort-object SizeGb is provided.

@lucdekens
Copy link
Collaborator

Did you adapt plugin 02 Snapshot Information?
What did you change and where?

It should be sufficient to add a Sort-Object to the end of the line.

$VM | Get-Snapshot | Where-Object {$_.Created -lt (($Date).AddDays(-$SnapshotAge))} | Get-SnapshotSummary | Where-Object {$_.SnapName -notmatch $excludeName -and $_.Description -notmatch $excludeDesc -and $_.Creator -notmatch $excludeCreator} | Sort-Object -Property SizeGB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants