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@vm.marist.edu> wrote on 03/14/2013 09:51:49 AM: > From: "Schaub, Steve" <steve_sch...@bcbst.com> > To: ADSM-L@vm.marist.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@vm.marist.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 >