The next great STSADM command... fix many of your problems!

New command being developed to solve SharePoint issues in publishing sites, for simplified URL handling and object creation. Free beta download soon.

Want to download the resources associated with this article? Jump to the end 👇

There is something I’ve been working on for a few weeks trying to fix a handful of the issues that seem to always creep up in every SharePoint project… more specifically Publishing site projects. You know… the things we deal with in the URLs, creating infrastructure objects, moving them between environments, … etc. The command is meant to make things a bit easier.

It does quite a bit more, but I promised a handful of folks at the MVP Global Summit three weeks ago that I’d release it to the world (as a free download), at minimum a beta version, before the end of the month. Well, looks like I missed that by an hour or so, but I at least wanted to share it ASAP, so here you go just a bit past the last day of March.

Dustin recently tipped my hand this was coming as I showed an early version to him and a few others at the MVP Global Summit. Couldn’t resist but I had to get input from one of my local Florida SharePointers at the Orlando Code Camp last weekend. So far, feedback has been quite positive and I’m very optimistic at the final results. Now… I only have three problems:

  1. I need testers! I only have so many virtual environments to test it on. I’m hoping my readers will help me test it… will you?
  2. Document the damn thing! Yeah, this post just won’t cut it. Hopefully, the output generated as the command runs will do enough for you.
  3. What do I call this dang thing? For now, it is the AC’s Site Fixer. Sounds hokey… and it is… just not that creative.

To test, download the ZIP and extract the WSP out onto your SharePoint environment. Next, enter the following command to add the solution to the farm’s solution store:

stsadm.exe -o addsolution -filename \[path to WSP\]\\ACsWssSiteFixerCustomCommand.wsp

The last step is to deploy the solution, which you can do via SharePoint’s Central Admin website or using this command:

stsadm.exe -o deploysolution -name ACsWssSiteFixerCustomCommand.wsp -allowgacdeployment -local

The solution deployment does two things: (1) deploys an assembly to the GAC that contains the custom command and (2) copies the necessary XML file to the **[12 hive]\CONFIG** directory making STSADM aware of the new command.

Now, to run it, simply enter the following command (Again, please don’t run this on production sites, only development sites. It will make NO changes to your site, but it will generate and return a wealth of information.):

stsadm.exe -o acsitefixer -url http://\[URL of a WCM site\]

Sit back and watch it work… should take no longer than 60 seconds… just make sure you watch everything it reports… especially the last bit if it was successful or not. Just as Dustin said in his post,I hope you say “thank you, Andrew, for you have saved my SharePoint sites!

I’ll repost back later this week on an updated version after I’ve received some feedback, as well as release the cleaned up source code. Oh, if you do decide to test, please make sure you drop a comment on this post. I’ll hold off moderating all of them for a few days, but I’d like to know who you are. Thanks!

Download article resources

Want the resources for this article? Enter your email and we'll send you the download link.
Andrew Connell
Developer & Chief Course Artisan, Voitanos LLC. | Microsoft MVP
Written by Andrew Connell

Andrew Connell is a full stack developer who focuses on Microsoft Azure & Microsoft 365. He’s a 20+ year recipient of Microsoft’s MVP award and has helped thousands of developers through the various courses he’s authored & taught. Andrew’s mission is to help web developers become experts in the Microsoft 365 ecosystem, so they can become irreplaceable in their organization.

Share & Comment