# Windows Server backup copies

**URL:** <https://forums.powershell.org/t/windows-server-backup-copies/16857>\
**Category:** PowerShell Help\
**Created:** [June 18, 2021, 9:48am UTC](https://forums.powershell.org/t/windows-server-backup-copies/16857 "2021-06-18T09:48:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ravi2021](https://avatars.discourse-cdn.com/v4/letter/r/71e660/32.png) [@Ravi2021](https://forums.powershell.org/u/Ravi2021)\
**Post date:** [June 18, 2021, 9:48am UTC](https://forums.powershell.org/t/windows-server-backup-copies/16857/1 "2021-06-18T09:48:55Z")

</div>

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.

Please do help me on this.

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [June 18, 2021, 10:00am UTC](https://forums.powershell.org/t/windows-server-backup-copies/16857/2 "2021-06-18T10:00:38Z")

</div>

Ravi,  
welcome to the forum.

You will have to share more detailed information about what you’re trying to do and how your environment looks like.

What have you tried so far? Please share your code.

---

<div class="post-metadata">

**Author:** ![Ravi2021](https://avatars.discourse-cdn.com/v4/letter/r/71e660/32.png) [@Ravi2021](https://forums.powershell.org/u/Ravi2021)\
**Post date:** [June 18, 2021, 10:16am UTC](https://forums.powershell.org/t/windows-server-backup-copies/16857/3 "2021-06-18T10:16:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [June 18, 2021, 10:25am UTC](https://forums.powershell.org/t/windows-server-backup-copies/16857/4 "2021-06-18T10:25:25Z")

</div>

Please, when you post code, error messages, console output or sample data format it as code using the “_preformatted text_” button ( **\</\>** ).

(You can edit your existing post to correct the formatting. You don’t have to create a new one)

Thanks in advance

The error is pretty obvious I think. The parameter -BackupTarget expects a particular type. You may show the rest of your code. … or at least the relevant part of it.

Please keep in mind - we cannot see your screen and we cannot read your mind AND we do not necessarily have the same experience and possiblities to test like you. So it would be nice if you share ALL needed information without beeing asked for each single one.

Thank you.

Edit:

According to the documentation the parameter -BackupTarget is optional. So you could list all of the available ones and pick the one you’re after with a` Where-Object` if that’s easier for you.

> **[Get-WBBackupSet (WindowsServerBackup)](https://docs.microsoft.com/en-us/powershell/module/windowsserverbackup/get-wbbackupset?view=windowsserver2019-ps)**
>
> Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:24pm UTC](https://forums.powershell.org/t/windows-server-backup-copies/16857/5 "2024-05-16T20:24:13Z")

</div>

Closed on May 16, 2024, 8:24pm UTC


