.NET Framework - wbadmin start backup... difference between Powsershell and cmd

Asked By rickplayamx on 05-Jun-12 05:57 PM
I am running "wbadmin start backup -include:C:E: -backupTarget:G:" in
both Powershell ISE 2 and from the command line in SBS 2008.

From the command line it runs fine, from powershell I get the error:
Corp.  Retrieving volume information...   ERROR - One of the source
volumes specified cannot be included: C: E:. Please  specify source as
a volume drive letter or access path (if volume is mounted  in a
folder). Only volumes on locally attached disks can be backed up."

C and E are both physical drives located inside the server.  G is an
external USB drive.

Why does it not work in Powershell?


Joe Morris replied to rickplayamx on 06-Jun-12 06:29 AM
[error message]

I do not use wb but the Win2008 admin pocket guide shows that the -include
switch expects a comma-delimited list if more than one source is specified.

* -include  Sets a comma-delimited list of
volume drive letters, volume mount points,
and GUID volume names to back up.

In your case this should be:


See the example on page 481.

Joe Morris
rickplayamx replied to Joe Morris on 06-Jun-12 08:09 AM
Thanks Joe,

The missing comma was a typo.  I did have it in the code that gave the

The problem was solved by putting the -include into a variable -
apparently ps was confused by the inline assignment.

$include = "C:,E:"
wbadmin start backup -include:$include ...