Video Screencast Help
Give us your opinion and win with Symantec! Please help us by taking this survey to tell us about your experience with Symantec Connect, so that we can continue to grow and improve.  Take the survey.

Save without confirmation

Created: 28 Jan 2013 • Updated: 16 Mar 2013 | 1 comment
This issue has been solved. See solution.


At the end of a bemcli script I have got Save-BEBackupDefinition.

Now I would like to run the script without the need to confirm the save action. I tried with the -Confirm switch without success.

Should it be

Save-BEBackupDefinition -Confirm True


Save-BEBackupDefinition -Confirm False

I have found examples with -Confirm:$False which also does not work in my script. Why a : ?

Get-Help Save-BEBackupDefinition does not explain the -Confirm switch.

Thank you


Comments 1 CommentJump to latest comment

pkh's picture

The correct way to code the parameter is -Confirm:$False.  Why did you say that this does not work?

The confirm switch is part of Powershell and not a special parameter created in the BEMCLI cmdlet.  That is why the cmdlet does not need to explain its usage.

As to why the colon, confirm itself is a switch and its value needs to be tested.  See this for a fuller explanation.

P.S. I find it easier to debug a script if I step through each command separately before I put them together in a script.  This way, I am sure that I got the syntax right for each command.