Hot answers tagged stsadm
5
I'm pretty sure that if your assemblies contain feature receivers then they need to be installed into the GAC.
There is a post about it here, but in my opinion it doesn't give a good explanation why.
My theory is that when you attach a feature receiver to a feature, the assembly needs to be globally available, since FeatureInstalled/Activated etc can be ...
5
PowerShell is Microsoft’s next-generation scripting language offering direct access to .NET
objects, complex flow and structure capabilities, and an object pipeline that makes passing
objects from one command to another extremely easy.
Using Powershell in SharePoint 2010, Almost every aspect can be manipulated using any of the more than 500 out-of-the-box ...
4
I've been successful with the following script
Process exportSite = new Process();
string commonFilesPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.CommonProgramFiles);
string commandLine = " -o export -url " + SPContext.Current.Web.Url + " -filename c:\\" + tempName + ".exp -overwrite -includeusersecurity";
...
3
In your example you are backing up the root site collection of machine1 and restoring it under a managed path on machine2. You may want to make those consistent.
Emad is correct about step #2, as long as the application is setup on the server you will not need to create a content db.
One last tip, make sure that you have any customizations or solutions ...
3
the problem is that you cannot use RWEP to create the site collection. RWEP takes the the identity of the app pool and most likely (if you configured your farm correct) this account is not member of the farm adminstrators group - which is required to create the site collection. If you run the code in central admin it will work though, since it takes the ...
3
You dont mention the version of SharePoint you are using, but since you mention stsadm i am gonna assume you are using SP2007.
You should follow this guide on technet. Be aware that the procedure varies depending on if you are running named instances (alias) or not.
For SP2010 use this article instead.
3
stsadm -o execadmsvcjobs does not always wait until the job you created has finished processing, nor does it ensure that the job processed successfully. A safer approach is to watch the solution deployment status in Central Administration and not execute your ActivateFeature command until you see that it has deployed.
I have also seen it happen where the ...
3
In general, I've found two superior alternatives to launching stsadm as a separate process. First is using the SharePoint Object Model. In your case, this would be with the function SPAlertTemplateCollection.InitAlertTemplatesFromFile. This gets you the best error handling story.
If there's something that's not exposed via the OM or it's more work than ...
3
Your scope for feature is at "Web Application" level feature and therefore be visible at
Central Administration -> Application Management -> Manage Web Application
Features
See technet
Edited
You can activate Web Application Feature by giving it's url.
stsadm -o activatefeature -id GUIDID -url https://abc303.development.com/
If you're facing ...
3
Yes, it's cache related.
When you execute "addtemplate" from stsadm, the template file is actually saved to the content database. To be specific, it will be added as a custom global web template " SPPersistedCustomWebTemplate" through the SharePoint "SPWebService" object (which is a sort of helper object that helps SharePoint Web Application retrieve and ...
3
First, get all your web applications and iterate through them. While in the loop print web application name and application pool name. Last, iterate all solutions and print their names - like this:
$contentWebAppServices = (Get-SPFarm).services |
? {$_.typename -eq "Microsoft SharePoint Foundation Web Application"}
foreach($webApp in ...
2
I think this was fixed in SP2, but in SP1 I noticed that when I restored a site, if I didn't have the url correct, it would think i'm talking about the root site instead of the one I was referring to.
so
stsadm -o restore -url http://machinename/sites/siteabc -filename c:\backup\siteabc.bak
would work, but
stsadm -o restore -url ...
2
you can use
stsadm -o enumsolutions
Be aware that its a best practice to always deploy from the same WFE. That way you wont have conflicts between hanging jobs.
The problem is related to the fact that stsadm -o execadmsvcjobs only runs pending jobs on the WFE you are on, not on the entire farm. Gary Lapointe created a job that will run jobs on all ...
2
Sounds strange since it should work.
Using WSPBuilder you should create your project as follows:
Create a new WSP Builder project
Add a subfolder to the /12/ folder called Config
In the /12/Config folder add a file called stsadmcommands..xml. Make sure that it always starts with stsadmcommands
Add a class and inherit from ISPStsadmCommand
Implement the ...
2
How interesting! Test this running the latest service pack and cumulative updates. If it still occurs it is obviously a bug that you should report to Microsoft.
In the meantime your best option is to correct the output from stsadm using a simple string replace before attempting to parse it as XML.
2
A couple of things here:
Using backup/restore to move a site between environments is only supported under specific circumstances. For publishing sites, you need SP2 and the April 2009 Cumulative Update or later (not sure without checking version numbers if you have this). Stefan discusses this for publishing sites here, but I'm not sure how this applies to ...
2
EASJ has several issues.
First of all, there is no guarantee that the deployment succeded after running EASJ. You will have to call ENUMSOLUTIONS and parse the XML returned to see if the deployment wen well.
Secondly, EASJ only checks for jobs in the SPAdministrationServiceJobDefinitionCollection of the current Web Front End server. This is probably what ...
2
If you think about it there are several reasons why a Feature Receiver would have to be installed in the GAC.
What would happen if you had the code linked to a Farm scoped feature?
How could stsadm execute feature activation if the code was only available to a given web application.
So yes you need to seperate your feature receiver code into a dll ...
2
Are you able to take a backup of the content database that holds the site collection? If you do so you can then restore the SQL Content DB to your dev sql instance and attach it to a development web application, the attach will perform an 'upgrade' on the content db and should take care of your issue.
2
Yes it doesn't seem to be documented very well. It appears that it only displays activated features, both visible in the UI and hidden in the UI.
Sample output:
<Features>
<Feature Id="00bfea71-c796-4402-9f2f-0eb9a6e71b18" Count="1" DisplayName="WebPageLibrary" InstallPath="C:\Program Files\Common Files\Microsoft Shared\Web Server ...
2
I have figured it out (at least for it to work for me). I am still unsure if I am missing anything to keep me from being able to create the site directly through the SharePoint front end. What I had to do was create the site through the stsadm command line.
stsadm.exe -o createsite
-url <url>
-owneremail <someone@example.com>
...
2
You are missing the ElementFile element. From what you've described, your feature.xml should look something like this:
<?xml version="1.0" encoding="utf-8"?>
<Feature
Title="YourFeature"
Description="YourFeature"
Id="GUID"
Scope="Site"
Version="1.0.0.0"
Hidden="FALSE"
DefaultResourceFile="core"
...
1
Have you applied the latest service packs for MOSS?
You will need to check your SharePoint logs and Windows event logs and perhaps update your question to add any relevant information.
If that doesn't help you, and you are desperate to get the content back, you could try opening the SharePoint backup cab and trying to restore the individual content ...
1
Are you the one that created the web part? Sometimes this can also be a result of the feature trying to reference an object that's not available on the farm (ie: writing to a list that doesn't exist, hard coded list GUID that doesn't match production, etc).
As others have said, check the ULS logs (should confirm the above scenario), ensure you're executing ...
1
Why don't you use stsadm and detach the database from your vm and then attach it on your other environments?
you can use stsadm -o deletecontentdb (despite the name this actually detaches the db without deleting it)
http://technet.microsoft.com/en-us/library/cc262449(office.12).aspx
then you can copy the this db and attach it on your other environments.
...
Only top voted, non community-wiki answers of a minimum length are eligible
