Wednesday, 30 April 2008

Tips & Tricks for using STSADM command

To save the output of STSADM Command into a text file use the following :
eg:stsadm -o addsolution -filename MySoln.wsp >>output.txt 2>&1
(Dont remove 2>&1--these are standard dos error handlers.)

If we are using -immediate or -time or -local (Asynchronous commands) with STSADM command, then next STSADM command would fail. Like:
stsadm -o retractsolution -name Mysolution.wsp -immediate
stsadm -o deletesolution -name Mysolution.wsp
The second command should execute after the first command has executed completely. But here it would fail.In order to avoid that we have two solutions
Solution One:
  • echo some text pause

  • Solution Two:
  • Execadmsvcjobs command.But this should be used very carefully because it would execute all the administrative jobs immediately
  • No comments: