Hot answers tagged

6

I recently ran into the exact same issue in SP 2013 where my Dev machine had the RTM install and the target server the June CU. We ended up copying the Content Database from SQL directly, reattaching and associating it to a Web Application and it worked flawlessly. It seems the Restore command is no longer backwards compatible and can't be relied to restore ...


4

'A failure occurred during the processing of this command. Check diagnostic logs for more information' is in fact "Access Denied error to the User Profile Service Application". TO resolve this issue, Navigate to Manage Service Applications ---> User Profile Service Application Name ----> select Permissions from the ribbon ----> Add your user ...


4

Please follow steps given below to ensure SharePoint Administration Services is available: Click on Start->Run->Services.msc. Search for "SharePoint 2010 Administration" service and make sure Status is Started. If it is not enabled, start the service and re-execute the command.


4

Checking the list of ststadm operations seems that there is no stsadm command for disabling a timer job. There is only a command to delete a timer job (deletessptimerjob). In that case you are left with two options: Disable the timer job using the UI in Central Administration (Central Administration -> Operations -> Job Definitions) Disable the timer job ...


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

We had logic that was calling Install-SPSolution twice on different solutions (same behavior observed with stsadm), and then logic for waiting for the deployment to complete. In rare instances, what happened, is that both solutions were attempting to acquire the deployment lock before either thread got the lock; one thread would succeed and one would fail ...


2

Here is the MSDN, basically using(var site = new SPSite(SPContext.Current.Site.ID)) { var webapp = site.WebApplication; webapp.ChangeLogRetentionPeriod = new TimeSpan(1,0,0,0); // meaning 1 day } The code must be executed by a Farm Administrator account, so you might need to do som impersonification in the new SPSite statement, like new SPSite(...


2

plz try with this Export and import a subsite, list, or library: stsadm -o export –url [url of subsite, list, library] –filename D:\spbackup\backup.bak -quiet -overwrite stsadm -o import –url [url of subsite, list, library] –filename D:\spbackup\backup.bak -quiet If the command is entered correctly and you have the permission needed to run the export, ...


2

Out of the box of PowerShell cmdlets, It can't be done. It's no valid cmdlets in the Index of SharePoint Server 2010 Windows PowerShell cmdlets However, Stefan Goßner wrote the blog post SharePoint Variations – The complete Guide – Part 16 – Translation Support which go over the topic in detail. He suggest to use PublishingService to export/import ...


2

You can use the pwoershell to get the alerts for a site collection. First you make sure powershell is properly configured. Now run the below script and you will get it. Add-PSSnapin microsoft.sharepoint.powershell $site = Get-SPSite "http://dlvrn2010.com/sites/spalerts/ $alertResultsCollection = @() foreach ($web in $site.AllWebs) { ...


2

Seems that in the previous action, a site collection reference already has been created somewhere in the web application configuration. Although there’s a reference, the necessary files to render the page aren’t there. There’s also no possibility to remove the existence of the site collection. When you try to do something with the site collection, for ...


2

Migrate User command Scope to the Farm. It will move user from All site collections from old domain to new domain. this is basically update reference of account everywhere in farm. check this interesting comment. http://blogs.msdn.com/b/rcormier/archive/2012/02/24/interesting-side-effects-of-the-move-spuser-powershell-cmdlet.aspx


2

To find out what databases the IDs correspond to, run: Get-SPContentDatabase | Select ID,Name


2

The proper use of this cmdlet is: $user = Get-SPUser -Identity "i:0#.w|domain\janedoe" -Web http://webUrl Move-SPUser -Identity $user -NewAlias "domain\janesmith" -IgnoreSid The Get-SPUser example is using Windows Claims (drop the i:0#.w| if not using Windows Claims) and the -Web is a Site Collection where the user is present in the User Information List.


2

STSADM doesn't support adding or managing list content. it is primarily for managing the SharePoint server infrastructure and also 2007 version don't have native support with powershell. best method is to use object model in C# but you can also use reflection to call the same dll's in powershell and leverage the same object model with the below code. Try ...


1

This is two step Process: First you have to Add the solution into Farm stsadm.exe -o addsolution -filename yoursolutionpackage.wsp Second, You have to deploy it. stsadm -o deploysolution -name yoursolutionpackagename.wsp -url http://sp-mach/ -local -force Check this for more info: http://www.ironspeed.com/Designer/9.1.1/WebHelp/Part_VI/...


1

I've had this problem before. You probably need to run the PowerShell command Get-SPProduct -Local Also I would try to run the PSConfig on all servers. More here: http://thesharepointfarm.com/2013/12/the-magic-of-get-spproduct-local/


1

it is becuase one of the site collection having quota problem where this user having some kind of permission. you can check the ULS logs or run the below script to find the quota of all site collections in your web app, from there you will know which site collections having quota problem. Copy the code in notepad and save the file with a .PS1 extension, ...


1

I think you are looking for this. https://social.technet.microsoft.com/wiki/contents/articles/3837.how-to-identify-and-clean-up-orphan-sites-and-orphan-contentdatabases-in-sharepoint.aspx Please let me know if this works.


1

Yes, Your understanding is correct. When you run the migrateuser command if new login does not exist in AD then this command will throw the errors. It will copy the permission from old ID to new ID.


1

The migrateuse STSADM operation actually associates the existing permissions of DomainA\xyz(Old user) with DomainB\xyz(New user). In this process it first removes all the existing permissions of DomainB\xyz (New user), if any. Here is a very good detailed explanation of how actually migrateuser operation is executed behind the scenes.


1

We can hide the site templates using powershell, the below powershell script will remove all the templates other than "Team sites" and "Blog". $Web = Get-SPWeb "http://sharepoint.crescent.com/teams/" $Web.AllProperties["__WebTemplates"] = "<webtemplates><lcid id=""all""><webtemplate name=""STS#0"" /><webtemplate name=""BLOG#0"" />&...


1

My dear comrades, this problem has been nagging me since 2 weeks. I have tried anything and every possible solution suggested on the internet, even if some were remotely connected. I had sat on my peers' heads to give me some clues to fix this issue... and guess what fixed it how ... ACT OF DESPERATION: I detached the content DB and then attached it. Thats ...


1

I am sure Gary Lapointe's custom stsadm will not work in 2013. You need to do the following things. 1st deploy the Lapointe.wsp to install all the custom commands. Download it from here :SharePoint 2013 Server Cmdlets (x86, x64) Once above solution succesfully installed then all his custom command will be available. Now you to run the following command. ...


1

SharePoint 2007 does not have PowerShell support. In Visual Studio create a console application that loops through all the site collections and sites. You need to run this program on the SharePoint 2007 server. http://msdn.microsoft.com/en-us/library/office/ms462161(v=office.14).aspx static void Main(string[] args) { SPFarm farm = ...


1

Check your database version using following Get-SPContentDatabase <DB name>| Format-List * In this check the SchemaVersionXML if it is "4.0.145.0" then you have to run the below powershell script **Upgrade-SPContentDatabse –Identity <DB Name> and then take fresh back up and try.


1

To query Windows Registry is probably the most reliable way to detect if SharePoint installed (Visual Studio uses this technique). Please follow the article How To: Detect the Installed SKU of SharePoint 2010 for more details. It contains code sample that demonstrates how to retrieve the registry key of the installed SKU of SharePoint Server 2010. ...


1

stsadm –o enumcontentdbs only returns content database. To find other DBs: Content DBs: These are actually listed quite nicely in central admin. At least they gave us that: APP MANAGEMENT >> CONTENT DATABASES >> select each WEB APP you want to see a list of content DBs for. Config DBs: This one was tricky and took me a while. Turns out this info is ...


1

To get the site id use powershell. Interestingly in my case I can create the powershell object. E.g. $s=Get-SpSite <url> $s.ID Go to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN Then execute STSADM -o deleteconfigurationobject -id <site id> In once case this worked Or you can try deleting $s.Delete ...


1

I am not sure if i am late or not. this error comes for one of the following reasons: Backup SharePoint server version is different than the restore server version The backup file is corrupted The used user account is not having the permission on the content DB for the web application that you want to restore on.


Only top voted, non community-wiki answers of a minimum length are eligible