We help IT Professionals succeed at work.
Get Started

How to get   vssadmin delete shadows /all to run in a batch file

donpick
donpick asked
on
2,617 Views
Last Modified: 2015-09-21
Running Small Business Server 2008 on a HP ML350 G5 server.
The 3rd party backup fails often with the error:  “Failed to Create Volume Snapshot.  Result code :  0x0042313”

I have found if I execute the command:
  vssadmin delete shadows /all

This command will fix the problem.  

Question:  I'd like to run this as a batch file.  The batch file will execute the   vssadmin delete shadows /all
   command.  The   vssadmin command asks a question when it executes.  In my batch file I placed the letter Y under the command to run   vssadmin .   It seems   vssadmin does not see the Y  so it just sits there waiting for something to enter the letter Y.

I am not a script expert.  What script would you suggest I write so the   vssadmin delete shadows /all   will see the letter Y and run to completion?

Thank you for your help.
Comment
Watch Question
Solutions Architect
Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE