ADSM-L

Re: [ADSM-L] Need help getting TSM Selective to work in a Powershell script

2013-03-14 10:56:23
Subject: Re: [ADSM-L] Need help getting TSM Selective to work in a Powershell script
From: Del Hoobler <hoobler AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Thu, 14 Mar 2013 10:54:19 -0400
Hi Steve,

I did not realize you had the quotes in the variable.
The following works successfully for me:


[PS] D:\Program Files\Tivoli\tsm\baclient>$myBackupDir = "E:\folder with
spaces"

[PS] D:\Program Files\Tivoli\tsm\baclient>&.\DSMC SELECTIVE $myBackupDir\*
-SUBDIR=Y

Are you launching it differently?

Note: In order to capture all files, include the \* at the end.


Thanks,

Del

----------------------------------------------------

"ADSM: Dist Stor Manager" <ADSM-L AT vm.marist DOT edu> wrote on 03/14/2013
10:24:11 AM:

> From: "Schaub, Steve" <steve_schaub AT BCBST DOT COM>
> To: ADSM-L AT vm.marist DOT edu,
> Date: 03/14/2013 10:25 AM
> Subject: Re: Need help getting TSM Selective to work in a Powershell
script
> Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT vm.marist DOT edu>
>
> Del,
> Still getting an error:
> PS C:\Program Files\tivoli\tsm\baclient> $myBackupDir = "F:\folder
> with spaces"
> PS C:\Program Files\tivoli\tsm\baclient> &.\DSMC SELECTIVE
> \"$myBackupDir\" -SUBDIR=Y
> ANS1107E Invalid option/value: '-SUBDIR=Y"'
> PS C:\Program Files\tivoli\tsm\baclient>
> Thanks,
> -steve
>
> -----Original Message-----
> From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On
> Behalf Of Del Hoobler
> Sent: Thursday, March 14, 2013 10:16 AM
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: Re: [ADSM-L] Need help getting TSM Selective to work in a
> Powershell script
>
> Hi Steve,
>
> Try placing a \ before each double-quote. For example:
>
>     DSMC SELECTIVE \"C:\DIR WITH SPACE\" -SUBDIR=Y
>
> In your example:
>
>    &.\DSMC SELECTIVE \"$myBackupDir\" -SUBDIR=Y
>
>
> Thanks,
>
> Del
>
> ----------------------------------------------------
>
>
> "ADSM: Dist Stor Manager" <ADSM-L AT vm.marist DOT edu> wrote on 03/14/2013
> 09:51:49 AM:
>
> > From: "Schaub, Steve" <steve_schaub AT BCBST DOT COM>
> > To: ADSM-L AT vm.marist DOT edu,
> > Date: 03/14/2013 09:54 AM
> > Subject: Need help getting TSM Selective to work in a Powershell
> > script Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT vm.marist DOT edu>
> >
> > I am building a script which will perform selective backups on a list
> > of directories.
> > This command works:
> > &.\DSMC SELECTIVE $myBackupDir -SUBDIR=Y As long as the directory
> > doesn't have any spaces in the name.
> > I have been pulling my hair out trying to figure out how to get
> > Powershell to pass the required double quotes to the TSM command so it

> > will work.
> > Anyone have a working example?
> > TIA,
> >
> > Steve Schaub
> > Systems Engineer II, Windows Backup/Recovery BlueCross BlueShield of
> > Tennessee
> >
> > -----------------------------------------------------
> > Please see the following link for the BlueCross BlueShield of
> > Tennessee E-mail disclaimer:
> > http://www.bcbst.com/email_disclaimer.shtm
> >
> -----------------------------------------------------
> Please see the following link for the BlueCross BlueShield of
> Tennessee E-mail disclaimer:  http://www.bcbst.com/email_disclaimer.shtm
>