I've moved my blog to http://blog.falchionconsulting.com!. Please update your links. This blog is no longer in use--you can find all posts and comments at my new blog; I will no longer be posting to this site and comments have been disabled.

Great tool. I was able to move a document library. My only question is my doc library does not inherit permissions. I tried the includeusersecurity but it still creates the new doc library with inherited perms. Any suggestions?

Jeff - this definitely appears to be a bug with the deployment API. I know that's a crapy answer but unfortunately I'm completely at the mercy of the API unless I want to create my own from scratch (beginning to think I'll have to considering the number of bugs I've discovered with it). I've sent an email to Stefan Gobner who wrote the original article that I based my code on - hopefully he has some suggestions or can at least help to get it addressed in a future service pack. In the meantime I'm going to work on a new command (CopyListSecurity) which will hopefully help. I've found that the same inheritence issue exist for list items as well - not just the list itself. This seems like a real weakness with the API because it would be easy for someone to assume that the list's security settings were preserved when in fact they weren't.

2000 Lists?!?! - wow - Are all the lists supposed to be in the same site? Are they all different? There's a few ways you could do it - you could set up a list the way you want as a template and then export the list without compression. This produces a Manifest.xml file which you could then manipulate with an xslt or code which and then write some more code to loop through some other data source defining your list creation criteria and import the manipulated site. If the list is simple then just bypass the Manifest.xml stuff and programatically add the list and it's columns. Unfortunately I've got nothing to do all of this but there are pieces that you can use (importlist if you choose to use the template and importlistfield if not (though you'll probably want to just pull the code and refactor into your own solution rather than trying to use my commands directly)).

Gary,Great set of tools. Thanks for sharing your efforts. I was curious if you might be able to tell me if your export tools are capable of exporting a site structure without any of the files. I want to copy a large site that has 1000's of files but only want the structure and security from the original site.Thanks,

Wow. This is interesting reading as I have done a few console apps for the same thing. Now I want to rewrite everything as stsadm extensions! Thanks for contributing your research and snippets to the community!

I've been studying the commands looking for something I can use to set Document Library permissions. When I use a template to create doc libraries in a new site collection, they inherit the parent permissions. But, I need to set granular permissions on the individual libraries. Have you encountered this problem?

Eric - sorry for not getting back sooner (been a crazy week) - take a look at the copylistsecurity command - you should be able to take some of the code from that and tweak it to meet your needs (I don't have anything to do explicitly what you're looking for).

Gary,Great stuff above. I have been looking for a list like you have provided, thanks.Off subject here, but I live in Vail, Co and have been looking for someone local with extensive SPS, InfoPath, Project Server, SQL experience. I've even contacted NH with no help. I have quite a few questions with a few ideas I have in using the above technoligies together. Any suggestions?Thanks,Bryan

Bryan - I haven't worked with Project Server but I've done a bit with SPS, InfoPath, and SQL Server - I've been real impressed with the guys that I've met at my new job at Statera and I'd recommend getting in touch with them - if you send me your contact info and what you're looking for I'd be happy to get you in touch with the right people to see if there's anything we can do to help you out (you can email me at glapointe at statera dot com). If we're not the right fit then we'll do our best to get you hooked up with another Microsoft partner that can help you.

Hi Gary,many many thanks for sharing these great extensions. It's already helped me toautomate a number of tasks which I had to do manually!I have a quick question for you though:I am currently having to assign read permissions to an existing group over alarge number of sites and sub-sites that get re-generated every night.So the only way I have found so far is to perform the following actions forEVERY site URL:- click "New", "Add Users"- type the group name- tick the "Give users permission directly" and the read permission checkbox.Needless to say, this is far from being ideal.I was wondering whether one of your stsadm extensions could help me automatethis process?Many thanks in advance for your attention!Guillaume

I currently don't have anything that will do what you are looking for. I have to admit that I'm curious as to what your requirements are that result in these sites being re-created every night. One thing you may try is rather than assigning permissions directly to the site set up a policy within central admin for the web application that the sites live in.

Truly a great work! Thank you! I am looking for a utility to do a massive delete of User Profiles in MOSS. While your tools are awesome I could not find this feature. If you feel inspired to add this extension I would be even more grateful. Thanks for you awesome work!

Sherm - yes, I'm at the SPC - I'm currently about to head out to Matthew's Advanced Search Configuration talk. If you see a guy looking very tired and wearing a Boston Bruins cap, that's me (I'm usually in the front row of the sessions I attend). Hope to see you and enjoy the conference...

Cool! Thank you for your great job. I am not a programmer but your tool is very useful for me. I downloaded the tool (not source code) but I don't know where I should to paste the file "Manifest.xml" ? By the way, I am using wss3.0, can these tool work well on it?

You'll want to use the built in stsadm addsolution and deploysolution commands to deploy the WSP (you don't do anything with the contents of the WSP). If you don't want to use the WSP approach you can download the source and GAC the dll and copy the xml file to the 12 hive's config folder.

I haven't documented it yet but if you download the latest code you'll see that there's a new command called gl-extendwebapplication (note that I'm starting to prefix all my commands). You do in fact use the SPIisSettings object - you just need to set the SPServerBindings and SPSecureBindings objects. Download the code and you can see how I did this (note that I'm using some reflection to get the timer job to fire and using these objects does not allow you to create a new application pool - I'm mimicking the functionality that you get via the browser). If you want to be able to set the port, path, and create a new app pool then you have to use the obsolete SPGlobalAdmin.ExtendVirtualServerInWebFarm() method.

Great tool Gary! Got an issue when using exportlist - it's looking for a list template that is deployed as a feature that doesn't seem to exist anymore :-( Is there any way to export a list even when the list template doesn't exist? Cheers.

Bray - you can try the exportlist/importlist commands or the exportlistitem/importlistitem commands or the exportlistitem2/addlistitem commands - not sure if any of these will help you or not (it's been a while since I've played with them myself and I simply can't remember how they treat the lookup columns - you'll just need to try them out).

You have two install options - the recommended install is to download the WSP and use stsadm's addsolution and deploysolution commands to install the extensions. The second option is to just download the code and copy the xml file (found in the package folder) to the 12 hive's config folder and then just GAC the dll.

The best way to install is to use the WSP. Download the WSP (the link is under the "My Custom Commands" part on the top right of the blog posts) to your web front end server. Then at a command prompt use the built-in stsadm addsolution and deploysolution commands:stsadm -o addsolution -filename "c:\Lapointe.SharePoint.STSADM.Commands.wsp"stsadm -o deploysolution -local -allowgacdeployment -name "Lapointe.SharePoint.STSADM.Commands.wsp"stsadm -o execadmsvcjobs

first of all I need to tell, that you have done an awesome job on the stsadm. This tool is a great help for migrating.

One thing I was considering when looking on all the feature you have added is if your custom extentions can be used to deploy a list from one MOSS/WSS to another MOSS/WSS.

For exmaple. The marketing department puts in the dates of our exhibition calendar on your intranet. Once per day a scheduled job deploys the items of this calender to our customer extranet, which is also sharepoint based. The point is, that entries which are new in the intranet should be added to the extranet. Those which have been changed should be updated. And finally those deleted in the intranet should be removed in the extranet as well. I know the last is the most difficult.

Of course it would be very easy to deploy the full list once per night from the intranet to the extranet. But acting that way leads to the disadvantage that alerts in the extranet will lead to wrong results. If there is a true add and update, like a one way replication from intranet to extranet the alert feature would work correctly.

I did some tests and combinations of your features, but I was not able to build up a one way replication from one MOSS/WSS to another MOSS/WSS adding new entries of the intranet on the extranet server and updating modified ones from intranet to extranet. The deletion scenario is the one, which could be managed manually as well, as I know this one is more difficult.

Did you try to build up such a 1-one replication using your funcationalities so far? And if, how did you solve this.

Not sure why that would happen - if the dll is in the GAC then you shouldn't be getting that error. If you're also seeing this with other extensions then it's possible that you GAC or the dll is corrupt but then a lot of other stuff shouldn't work either. Have you tried to manually register the dll in the GAC???

Jakob - I'd recommend that you look into the content deployment jobs that you can set up via central admin. It's pretty buggy right now but it may meet your needs - note that there will be something coming from Microsoft soon to help fix the content deployment issues (can't say anything beyond that right now). The main reason you may run into issues with my stuff is because you are reparenting the list items (the GUID of your target list and web don't match the source list and web) so you can't use the -retainobjectidentity flag which, if set, will address all your issues but the deletion scenario.

Hello all... I am using WSS 3.0. I was able to download and install the stsadm commands (via .wsp install), but now when I try to use a command (gl-enumavailablesitetemplates), I get the following error: "Could not load file or assembly 'Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified." Can anyone help me? Please?

AJCGirl - My original code was getting the template information from the PublishingWeb - not sure why I did that (brain fart I guess). I've changed the code to pull from SPWeb so it should now work for you (PublishingWeb is a MOSS assembly but it just wraps the SPWeb object).

Your STSADM extensions are wonderful... One of my developers is trying to write software to move sites around much like you are doing here. I gave your extensions a try in a test WSS 3.0 environment and when using the gl-convertsubsitetositecollection or gl-repairsitecollectionimportedfromsubsite extension I get an error "Specified method is not supported." In the log file I find this:

Jared - I'm honestly not sure why you'd get that error as the code is copying all settings from the source (the set method will throw a not supported exception when the value is not within the acceptable range or if the list doesn't support moderation or versioning but as the moderation and versioning settings and the limit is coming from the source the only thing I can say is that something about the source list is corrupted. I've added some simple error handling to ignore the error and just not copy the setting so that it can move on to the other issues.

Jared - ignore my last comment - I'm an idiot - there's nothing wrong with your source list having moderation or versioning disabled - the code fix that I pushed out last night should resolve the problem for you.

Thank you for a quick response and update. It seems that the error I was having has passed, but now I am getting another one.

The type initializer for 'Microsoft.SharePoint.Publishing.Internal.Resources' threw an exception.

I am now wondering if we dont have another issue somewhere in our sharepoint implementation. I appreciate all your work and will be checking back for updates. One of our developers was happy I found your blog.

Michael - Try re-typing the command (not sure this is what's going on but if you copied and pasted from your command line into your comment then there's an issue with the "-o" (looks like you have a non-standard hyphen)). Beyond that what you typed seems to be correct (if you can get the help for the command then the command is installed correctly).

Great looking set of commands. I'm looking for something that may not be possible though, is there a way to backup a single site beneath the collection level. The OOTB stsadm only works at the collection level, and from what I read about yours it appears to be the same. Am I reading it wrong?

Kevin - correct, the OOTB backup/restore commands are for site collections. You can use the export/import commands to backup an individual sub-site but there are limitations to what it can handle (no workflows, no personalization settings, no alert settings).

I looked over your list of commands...but didn't see what I need. I'd like to use the stsadm createweb but be able to specify that it include the new web in the quicklaunch navigation of the parent, as you can when you use the GUI. Do you have a way of accomplishing this?

I have a feature that activates on the site creation that sets up branding, but would prefer this part to be specified in the call to create the web in the first place.

Great tool set Gary. I use it quite a bit =) I was wondering if you knew of anyway to export a site without it's subsites? I need move a number of sites around and some sites need to be moved without their subsites.

Patrick - I never got around to creating it but you could create your own version of the built-in export command and just add the include descendants property as a parameter. This property allows you to do an export without the sub-sites.

Mike - I don't have a createweb command but you can use the addnavigationnode command to do it. This is the code code that runs when you create the web using teh UI: if (bOnQuickLaunch) { SPNavigationNode node2 = Web.Navigation.CreateHomeNode(Web.Title); try { Web.ParentWeb.Navigation.AddToQuickLaunch(node2, 0x402); } catch (SPException) { } }

You could easily write your own command that will do effectively the same thing as the createweb and then add the Web.ParentWeb.Navigation.AddToQuickLaunch bit in.

I have a document library with 200 thousand documents with metadata. I want to move all these documents to a new Farm and ofcourse into a document library of same type. Do you suggest any tools from your list.

200,000? WOW! - You could start with the gl-exportlist/gl-importlist or gl-exportlistitem/gl-importlistitem commands. If they don't work for you then you may want to look into third party tools such as those by Quest or AvePoint.

I have a question.. We're in teh process of migrating a site collection from a external site (half way around the world) into a corporate owned one, however the backup came at 27Gb and even after the restore 10hrs later the thing came up.

Now, some of the lists are causing issues, we're not sure if it's due to the backup/restore/splitting of the orginal files or what.

The particular case is that a user creates a personal view and then the default view gets lost from the list and only this user starts to get Render Error; a workaround is to use the Site Content and Structure or copy the files using SharePoint Designer from the original place.

Do you have something similar to the gl-exportList / gl-importList only for the structure? no content data... I'm thinking more on the lines of something like gl-applyListTemplate to a list without disturbing the current list content.

Yvan - unfortunately I don't really have anything that addresses the issues you mentioned. You might try and apply the infrastructure update and then try your migrations again or use backup/restore instead of export/import.

We have a test&dev environment that we want to "import" all of our web apps and associated site collections (small environment) from our production environment.

We have desparately been trying the stsadm export and import functions, but it seems that each time we do, there is a different set of errors and the majority of content is inaccessible or not locatable...

brucecmc - the export/import commands have lots of issues. I'd recommend that if you wish to use them to migrate your content that you look into upgrading to the infrastructure rollout which released a couple of weeks ago. You can also try using the backup/restore option though the recommended approach to go from one farm to another like you're trying is the export/import option. When using the import option you may want to give my custom version (gl-import2) which adds a property for retaining object identities. That "sometimes" fixes "some" of the issues - it reall depends on what type of issues you are having. Also - if you don't need all versions you can try setting the version options for the command. Another thing to watch out for is any custom solutions/features - any that exist in your source environment must exist in your target (and of course your sharepoint versions should match). The infrastructure rollup though contains something like 60+ major fixes to the content deployment components (which is what export/import uses). Hope this helps!

thanks for the quick response...I'll give the gl-import2 extension a whirl...We tried the backup/restore, got a little further with that, but still there are issues with access denied, invalid paths, and pages not located...

when i try to run "stsadm -help gl-setuserprofileimportschedule" i get this popup error, "Windows SharePoint Services administration tool has encountered a problem and needs to close. We are sorry for the inconvenience. If you were in the middle of something, the information you were looking on might be lost."

Ken - not sure what's up with the error but that particular command shouldn't be available at all for the WSS version as it only applies to MOSS. Are you sure you have the correct WSP installed? Can you confirm that you don't have an earlier version (before I split the project to two WSPs) installed?

Apart on the installed and deployed sucessfully shown in my Central Administration > Operations > Solution Management, on the physical server, do i expected any changes on the file or inclusion of any files in the "C:\Program Files\Common Files\Microsoft Shared\web server extensions" folder?

Because they are separate web applications you're going to have to re-auth. You might be able to get clevor with creating your own forms auth page and set the auth cookie be domain specific and not host (I've done this with straight up asp.net but it was a while ago and I'm not sure how/if it works with sharepoint). You might also be able to do something with ISA server but I've not looked into it.

yes, we pretty much have resolved to having the repeat the auth, so I'm taking a different approach, not sure if it is feasible or not..

Your thoughts would be appreciated:

scenario is this.

1. Public facing site collection, completely open to any one browsing. On this site collection, the content would display general information about our organization (nation wide).

2. Private site collection where users with approriate access/permissions can access and manage site colletions, sites and sub-sites...This site is secured with SSL, Common Access Card Authentication and Forms Authentication.

3. Additionally, we would like to have users that have access to the private site be able to perform site/site collection administrator functions on the public site

We think, and this maybe our overall ignorance of MOSS2007, we can create a "public" site collection and a "private" site collection sharing a single site content database? Would this be possible???

Our users could then manage content from the private side and it populate the public side...

So far, I havent found how to do such a thing or even if it is possible...

You can have the site collections exist in the same content database but they cannot share the same content. I'd actually recommend though that you not have them in the same content database for security reasons. What you'll need to do is use content deployment to propagate content changes from one site collection to another.

One more thing - I'd even go far as to say that you should put both of these on separate web applications each with their own application pool. For both security and performance reasons but primarily for security.

thanks again...they actually are different web applications..."content deployment", I hate to keep the thread going, but is that an "out of the box" function of SP...going to poke around today to see what i can find...

Yup, out of the box - if you google it you'll find a bunch of resources for it. Note that the infrastructure update adds tons of fixes for this - I'd recommend looking into deploying this update if you choose to go the content deployment route.

Hey Gary, I agree your extensions are everything that MS left out of the STSADM tool. However, I've just experienced some less-than-happy results trying to "gl-importlist" from one site to another. My steps were:

1) Create a site from a template made from the source site.2) Turn off all workflows on the site where I was moving to by disabling "Standard Features" at the site level.

I assumed that step 2 would keep emails from being generated when I imported the list to the new site. But for some strange reason, each new item added to the destination list sent an email to notify the approver, just as the parent list was programmed to do using OTB workflows.

Is there any parameter to the gl-importlist subcommand that might stop this from happening? Other than that your tool was the perfect solution to this archive request from our finance dept.

Alex - thanks for the feedback - unfortunately there's no options with the command to prevent those emails from going - I'm just using Microsoft's content deployment API so I'm kind of at the mercy of how their code works. The only thing I can think of would be to disable the workflow at the source, export, and then re-enable. Otherwise you might be able to look at the manifest.xml file that's generated by the export and then tweak that xml to adjust the settings to prevent any workflows from triggering (not sure what effort would be involved for that though).

First of all this is a great tool, Second I have a quick question I want to export or copy security settings for a site inside a site collection, your exportlistsecurity is very helpful for my document libraries but how could i do the same thing for the site in particular. Thanks in advance

Unfortunately I don't have anything to deal with site level security. I know that there are third party applications that address this though (and I'm sure I'll probably have to build something eventually but as of yet I've not had a need).

Great stuff. I downloaded the code and then went to run the deploy batch file under the releasewss folder. I noticed one slight errorSET SOLUTION_NAME="Lapointe.SharePoint.STSADM.Commands.wsp"should beSET SOLUTION_NAME="Lapointe.SharePoint.STSADM.Commands.wss.wsp"

Hey Garythanks for the great tools! I am very new to Stsadmin and was searching for a way to show the sites and subsites created in the Quick launch of my Moss 2007 and I ran across your site. Forgive the question, if it is fairly obvious.. but do you have a command/extension that will allow me to set the 'show me the site in the quick launch" when I create my sites in bulk. Thanks in advanceTrace

There's no support for creating a recurring task in a task list in Sharepoint. You'd think that this would be a simple thing to do, but apparently, it's not.

I'm trying to set something up where every morning at 3 AM, an item is added to a list and that item has an approval workflow attach and start itself (I think this part is set in the GUI). I have to use a workflow since there are 3 people that are assigned the task -- a limitation since tasks are only assignable to 1 person.

Is there a way that I can use gl-addlistitem and other commands to automate this? If I've created a custom list with the fields I want, how do I get your command to add a new item and populate those fields? Sorry if this doesn't make sense. Thanks for any help you can provide.

Yes - you could use the gl-addlistitem command (probably in a batch file with a scheduled task) to add an item to the list. You might run into an issue with getting the workflow to trigger though so you'll want to play around with it. Failing using my commands I'd recommend creating a custom timer job and just add the item to the list programmatically.

Great set of tools indeed! The only thing that I'm missing is a tool that can add or remove permissions on folder level. So if you have a Document Library with a set of subfolders under it, to grant or revoke a certain user (person/Sharepoint group/AD group) a certain role (contribute, reader etc.) to that folder. Of course it is possible to grant a user access on the DocLib and have it inherited to the child folders, but what if you want to have different permissions per folder? Any suggestions?

Do you have any tricks on renameing a site collection to a new URL? I was trying to do it via stsadm using the backup, delete, then restore operations, but I keep getting an error on the restore that it cannot lock the file "wss*1_.tmp" where * is a random guid each time i try running the command.

However, after having trouble when trying to deploy simple objects between servers ( e.g. gl-copylist, gl-import ), I went through the whole update procedure for both servers (the source and the target) up to the Infrastructure Update (both WSS and MOSS ) and ensured that both servers are at the same database level (12.0.0.6318).

As you mentioned in several posts, the deployment API has been updated significantly, so I hoped that this will solve the problem.

Unfortunately, I continue to receive the same message every time I'm trying to connect to the receiving server:

"The Web application at http://servername... could not be found. Verify that you have typed the url correctly ... etc "

All the references to this message I found so far mention that the account being used should have enough privileges, etc. Also, there are references to AAM ( Alternate Access Mapping).

So far, I tried every possible variation on this, trying to do it both from the source and from the target. Regardless of what I do, I'm always getting the same message, saying that the Web Application cannot be found.

Then I do 2 things. 1) I grap the url that the message puts next to " the web application at ... ", paste it into the browser and the application comes up. So, there are no typos.

2) I go to the other server and run "stsadm -o enumsite" or "stsadm -o enumsubwebs" and the url is there. So, the application is valid.

So, my question is:

any suggestion? Anything obvious I'm missing. This is preventing me from making any deployment.

Is there any place where we can debug this message? "The web application at ... could not be found. "

Francisco - all of the copy commands that I have will only work within the same farm - so you can't copy a list from one farm to another using the gl-copylist command but you can use gl-exportlist on your source farm, copy the files over to your target farm, and then use gl-importlist (the gl-copylist command just wraps those two up into one call for inter-farm copying).

Wasnt sure where to post this, so I just went to the newest thing i could find...I have 2 questions:1. is there a really good sharepoint forum (outside of yours of course) that i might routinely grab info and collaborate

2. I'm having a bit of a strange issue with IIS windows authentication. -- with anonymous access turned on in IIS, the site collection and within the CA for the site collection, I am periodically prompted for windows authentication. I have tried with both having windows auth on and off in IIS with a variant of the behaviour, but ultimately the same result.

Win Auth on - After IISRESET, on first attempt, prompts for auth. if cancel is selected, 401 error. if i use my domain credentials when prompted, receive share point access denied. subsequent attempts takes me to site without failure?

Win Auth off - no prompt, straight to 401 error, with the subsequent attempt taking me to the site without failure?

Bruce - your best bet for submitting questions would be the Microsoft forums: http://social.technet.microsoft.com/Forums/en-US/category/sharepoint/ - there's a lot of MVPs (including myself) that monitor the forums. Regarding your issue - offhand the only thing I can think of would be if you're using Kerberos and it wasn't set up correctly - beyond that I'd say look in your web logs, event viewer, and ULS logs for anything additional errors. Also - try using my stsadm command to set the anonymous access - just in case you missed a setting (which it sounds like you didn't).

thanks for the quick reply...as always, you're very prompt...thanks for the link..i'll check that out...

it appears (for anybody that may have been watching this string) that a DLL that we recently dropped in the GAC for custom navigation may have been my culprit...Not sure exactly why, unless it was a permissions issue of some sort that was requiring the windows auth...

Hi again Gary!Do you know of anything that can delete the audit table data. We had auditing turned on, now off, and want to get rid of the data.Any magic tricks up your sleeve?(ps...i already know about the KB article released in July...got anything else??) ;o)Denise

SS Ahmed, posted a couple of responses, but neither of which resulted in corrective action..

Futher digging into this error, I have discovered that by stopping the Windows SharePoint Service Administration Service stops the generation of the error. I thought possibly the account running the service was not correct/had correct permissions. Changing to known good account resulted in same errors.

I disabled the Windows SharePoint Service Administration Timer Job on the CA, this too resulted in the stopping of error generation...

so, obviously the errors are a result of this service running, but for the life of me, I can find a resolution.

Hi, I need to export/import groups and permissions from a site collection, can you make an extension to do this ?

I have an application in production and I want to save groups and permissions, replace the application by a new version (using stsadm -o import...) from a test environnement and reimport the groups and permissions in the new version.

I used your MOSS extensions to help automate nearly everything in our install. Thanks SO MUCH! One thing that I can't figure out is using the 'siteadmin' command to add a secondary site collections owner.

Our MOSS install uses a custom authentication provider (RSA). I can set the custom authentication provider with stsadm, but when I try to set the secondownerlogin property with stsadm, the user isn't found. It works when I use the GUI. You ever had a need to set a site collections owner that has a user account in a custom authentication provider? We are manually doing this now, but would like to save a few mouse clicks. :)

Thanks again for your tool. It's been a life saver. I'll be watching and testing your powershell stuff.

Not via STSADM but if you do a search for sharepoint and membership providers then you will find some resources to help you. Another option you have is to use the BDC to get users from another location. I've not done any of this so I can't be of much use but if you dig around you should be able to find something helpful.

I got the following when trying to install the MOSS Powershell Cmdlets on my 64x bit MOSS install:

===========Error 1001. Error 1001. Unable to get installer types in the C:\Program Files (x86)\Gary Lapointe\PowerShell Commands for SharePoint\Lapointe.SharePoint.PowerShell.Commands.dll assembly. --> Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information., (NULL), (NULL), ==========

Gene - Unfortunately I don't currently have access to an x64 machine that I can test the installer on so I'm not sure what's going on. Is there any additional info in the event log or did it get so far as to create any log files in the install directory? If so could you send them to me? You can of course install them manually using installutil (just download the source to get the dll).

I did additional testing on 4 outher x64 machines and the results were the same. Unfortunately, I don't have a 32bit server to test. What's strange is that I try installing on my xp laptop (32bit)... and got the exact same error.

BTW. There is no DLL in the MOSS srouce download. I've extracted the only DLL in the wsp download and ran "installutil Lapointe.SharePoint.PowerShell.Commands.dll"... but don't see it in the GAC.

Gene - I hate asking this but your comment about installing on XP makes me wonder - do you in fact have PowerShell installed? Also - you won't be able to use any of this on XP - it must be installed on your MOSS/WSS server. And yes, the source does not include the dll - you'll have to build it.

I have Powershell 2.0 CPT3 installed. I now uninstalled this version and reinstalled 1.0 x64. I ran your installer again and get:

"Error 1001. An exception occurred in the OnAfterInstall event handler of Lapointe.SharePoint.PowerShell.Commands.SnapIn. --> Object reference not set to an instance of an object".

The event log show the following:

Event Type: ErrorEvent Source: MsiInstallerEvent Category: NoneEvent ID: 11001Date: 1/8/2009Time: 9:16:08 AMUser: GeneComputer: MyServerDescription:The description for Event ID ( 11001 ) in Source ( MsiInstaller ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Product: PowerShell Commands for SharePoint -- Error 1001. Error 1001. An exception occurred during the Rollback phase of the installation. This exception will be ignored and the rollback will continue. However, the machine might not fully revert to its initial state after the rollback is complete. --> Cannot delete a subkey tree because the subkey does not exist., (NULL), (NULL), (NULL).Data:0000: 7b 39 45 35 34 32 45 36 {9E542E60008: 43 2d 34 46 41 36 2d 34 C-4FA6-40010: 34 44 35 2d 39 36 35 44 4D5-965D0018: 2d 43 35 41 36 45 41 46 -C5A6EAF0020: 36 37 31 33 41 7d 6713A}

Ah - that makes more sense - I've only tested this with v1 - as for the null object exception - I'm working on that one - for some reason the SPFarm.Local object is coming back as null and I don't know why - you should be able to get around that by choosing to not install my extensions and just install them manually by deploying the wsp.

There were errors in loading the format data file:Lapointe.SharePoint.PowerShell.Commands, C:\Program Files (x86)\Gary Lapointe\PowerShell Commands for SharePoint\Lapointe.SharePoint.Format.ps1xml : File skipped because of validation exception: "File C:\Program Files (x86)\Gary Lapointe\PowerShell Commands for SharePoint\Lapointe.SharePoint.Format.ps1xml cannot be loaded because the execution of scripts isdisabled on this system. Please see "get-help about_signing" for more details.".

Great tools, Gary! Microsoft should hire you to fix their weak stsadm operation set. You might also consider adding a How-to-install-wsps-for-newbs section to your home page for those that don't know anything about addsolution and deploysolution.

Hi!What we are looking for is the possibility to inherit permissions downwords. In MOSS unfortuantely it is not possible like in NTFS to inherit permissions throught a site, because if inheriting is disabled at some stage, it stays disabled. Does somebody know a solution oder command to do this?Thank you very much in advance!!!

Instead of elevating my existing APID account with enhanced local and SQL permissions, I created at SharePoint_Upgrade account. Problem is we have over 100 sites using 5 Application Pools. I'm trying to find a way to stsadm script the App Pool ID\password acct change for each existing App Pool, (not by site - like your "gl-updateapppoolname" tool) Currently using the stsadm -o updatefarmcredentials comand for the CA Site\Pool, but still need to stsadm script a way to change the other app pools.

You can use the gl-updateapppoolaccount - it's per web application but if you combine that with a simple powershell script you should be okay (not sure if you'd even need to run it more than once though - possible SharePoint might see that it's used multiple times and just handle it (the app pool will certainly get updated and thus only one call is needed - question is whether SharePoint will update the config db for each web app)).

Hi, Gary--We use your commands daily--thanks very much for sharing them. Also, I really enjoyed your talk at BP San Diego. Question: Is there a way to list all users with Full Control in a site collection? - Sarah

Thanks! There's nothing out of the box and I don't have anything but you might take a look on codeplex (not sure if there's anything there but a good chance someone's built something like this - I get asked for it a lot :))

Thanks for the commands! I have been working on deploying connected lists via features and somehow i had some phantom lists on my site. I couldn't delete them with the UI or stsadm forcedeletelist. Your gl-deletelist command with the force option did the trick!!

A big thank you and a thumbs up! We've really enjoyed using your tool so far and think it's pretty much the best extension to SharePoint! It's really proven its value to us over tha last few days deploying to our new farm.

Wow! Great work..I have a requirement were in I have 1000 text files.I have to migrate those contents of 1000 text file contents to 1000 wiki pages under wiki library..Please guide me if I can use any of your STSADM commands

Can any of your commands create a new site collection role? i.e. one called author that has all the permissions of Full Control except author? This needs to be added to each site collection, not the web app. I am not looking forward to adding this to 50+ site collections :(

Not directly. You could use the gl-importlistsecurity on a temporary list and that would sort of get you what you want but you're probably better off either creating your own command or using powershell.

Hi Gary,Thanks for this wonder tool! :)I was being able to use the following command to make a gl-copylistitem from one documentlib to another, but when after checking the target doclib, I found out that only a portion of source doclib(50%) got copied over to the target doclib, and the other 50% simplied just ignored. However when checked the log(import/export), both seemed to be able to export/import all documents from the source!?

Great tools, saving me a lot of time. However, I am copying list from MOSS on a server in Active Directory to WSS on a standalone server in my test environment not in Active Directory. When I import lists (Issue Tracking) the Created By field is now set to my name and the Assigned To is blank on every item. Is this because the user accounts don't exists or do I need to -includesecurity when I export the list?

Rick - I've noticed a lot of people having issues with only some items getting imported - honestly I'm not sure what's going on a I've not seen it myself and have no error logs to reference. It's quite possible that this is due to some issue wth SP2 or some CU, not sure though. All I'm doing is calling out the content deployment API so the issue, whatever it is, is with that.

I have a requirement to copy documents from a group of Outlook public folders into Sharepoint 2007 sites. The purpose of this is to no longer use the public folders to store the documents.

There are thousands of documents and I do not want to do this manually using the Outlook copy command.

Also, setting up a sync connection is not acceptable because the documents will eventually be removed from Outlook.

Sending the documents as emails into SharePoint sites is also out as our firewall prevents any mail going into SharePoint at this time.

Do you know of any set of stsadm commands that can be used to do this? Any tools (other then purchaseing third party tools) that can achieve this requirement?Can you suggest someone who can answer this question if you can not?

Can you navigate to the files using explorer (webdav)? If so then you can simply drag and drop them into your document libraries. I believe Quest has a product to do this but I'm not aware of any free products.

I have a question: Is there a way to 'migrate' the corporate portal from one farm to another? i.e. the portal is at: http://servername/I have tried the "backup-restore" as well as the "export-import" commands but it does not work.Thanks!

Thanks so much for your extensions, I’m sure they are such a life saver to so many Sharepoint Developers including myseld.

I would like to add a Sharepoint Group I have created to a list and give the group specific permissions to that group, e.g. I want the SharePoint Group “Students” to have “Contribute” rights to the SharePoint list “Shared Documents”. Because I have quite a number of site collections, I’d like to be able to do it from the command line with stsadm.

Hi Gary, Thanks for this. I am stuck on the gl-exportlistfield. For some reason stsadm cannot access any folder on my local drive. What am i missing. I am a local admin on the box as well as have given Network Service account access to the folders. Please help!

Look at my post on the 2010 release. You'll see the stsadm commands that have been upgraded. Eventually I'll update this page but writing my book is my current priority so the blog has taken a back seat for a while.

My Custom Commands & Cmdlets

Use of any tools included in the various downloads found at this site is at your own risk. Gary Lapointe cannot be held liable for any damage done to your environment through the use of any code or downloadable tools found on this site.

You may not repackage or sell any of the downloadable tools or associated source code. Downloading of the various tools implies that you acknowledge these restrictions.