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.
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.