Share via

Windows Server backup copies

Tech Azur 21 Reputation points
2021-06-18T10:29:50.67+00:00

Hi

I’m working on Windows Server backups daily and weekly with PowerShell and Set retention policy to 7 copies, till here completed successfully. I stuck at finding out no. of copies available on remote server.

I tryed wbadmin, get-wbbackupset commands in various ways but could not find the solution.

PS C:\WINDOWS\system32> Get-WBBackupSet -BackupTarget \testvm\WindowsImageBackup -MachineName testvm
Get-WBBackupSet : Cannot bind parameter 'BackupTarget'. Cannot convert the "\testvm\WindowsImageBackup" value of type "System.String" to type "Microsoft.Windows.ServerBackup.Commands.WBBackupTarget".
At line:1 char:31

  • Get-WBBackupSet -BackupTarget \testvm\WindowsImageBackup -MachineNam ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : InvalidArgument: (:) [Get-WBBackupSet], ParameterBindingException
  • FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.Windows.ServerBackup.Commands.GetWBBackupSet
Windows for business | Windows Server | Devices and deployment | Set up, install, or upgrade
0 comments No comments

Answer accepted by question author

Leon Laude 86,201 Reputation points
2021-06-18T10:45:16.657+00:00

Hi @Tech Azur ,

With the wbadmin command the following should get the available copies/versions: wbadmin get versions
The Get-WBBackupSet is basically the same as the above command, but it seems you have the parameters wrong, here's an example on how to use it:

$BackupLocation = New-WBBackupTarget -VolumePath D:
$Backups = Get-WBBackupSet -BackupTarget $BackupLocation

----------

If the reply was helpful please don't forget to upvote and/or accept as answer, thank you!

Best regards,
Leon

Was this answer helpful?


1 additional answer

Sort by: Most helpful
  1. JiayaoZhu 3,926 Reputation points
    2021-06-21T02:32:56.573+00:00

    Hi,

    Thanks for posting on our forum!

    I am glad that see that Leon has already helped you solved your issue! And I would appreciate it if you could help Leon Accept Answer. When you Accept Answer, your blog will be automatically put on top of our forum. In this way, you can help more people who have a similar issue with yours to get access to their answer more quickly.

    Thanks for your support and understanding! And have a nice day! : )

    BR,
    Joan


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.