none
Need help scripting the Essentials Server Backup configuration in PowerShell RRS feed

  • Question

  • I'm trying to write a PowerShell script that automates the setup and configuration of the Server Backup feature within WS2012 R2 Essentials. There are a number of cmdlets for defining the backup source files and target location such as add-wssbackuptarget, add-wssbackupvolume, new-wssbackuptarget, etc.

    These cmdlets all have a required -Disk parameter and I can't for the life of me figure out the syntax for it. I've tried the disk ID, drive letter, LUN, volume label, and disk number. All of the examples in the help files are using variables instead of explicitly entering a value; I've tried using the example scripts and those fail too.

    So here's a quick example:

    Get-WssBackupPolicy | Add-WssBackupVolume -Disk ??

    I obviously need more parameters than that but the point is, no matter what other parameters I type and no matter what I enter for the value of -Disk, I always get "Cannot bind parameter 'Disk'. Cannot convert the "D:\" (or whatever I've entered) value of "System.String" to type "Microsoft.WindowsServerSolutions.DataProtection.ServerBackup.ObjectModel.BackupDisk".

    And like I said in the opening paragraph, I get that same error for any and all cmdlets that use the -Disk parameter. Does anyone know how to properly structure format the -Disk value?

    Thanks

    Monday, January 20, 2014 9:16 PM