PowerShell script exchange
Post Reply
pwinterbourne
Enthusiast
Posts: 33
Liked: 1 time
Joined: Jan 10, 2012 10:38 am
Full Name: Paul Winterbourne
Contact:

Inconsistent sort in Powershell (script vs commandline)

Post by pwinterbourne » 1 person likes this post

Hi,

I am having a problem with this command:

Get-VBRBackup -Name $Backupjob4 | Get-VBRRestorePoint -Name $server1 | Sort-Object –Property CreationTime –Descending

when running on the commandline it presents the most recent backup at the top (which is what I want). When running in the script the top result is a backup from the 17th of January with the latest somewhere in the middle. Does anyone know why this might be? (the script version is exactly the same code to eliminate any coding errors)

thanks,

Paul
Mildur
Product Manager
Posts: 10273
Liked: 2744 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Inconsistent sort in Powershell (script vs commandline)

Post by Mildur »

Hi Paul

I have the same output when running this single command as a script.
Could you maybe share the entire script with us?

Best,
Fabian
Product Management Analyst @ Veeam Software
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests