Hot answers tagged

6

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 ...


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

My guess would be that SharePoint caches the contents of the template store and an IIS reset is required to rebuild that cache to pick up the new template that you just added.


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 ...


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.


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

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 some ...


3

Some things to try first: Running an incremental crawl again Running a full crawl Adding a crawl rule specifically for that site, then running an incremental crawl In our case, we did not want to do full crawl in production because we didn't want to lose any more of the index (we have problems with the full crawl.. but that is another story). For most ...


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 found the answer. The reason is because the version numbers for my FARM 1 SQL DB is different from the one on FARM 2. I upgraded both servers to the same built number and everything worked fine. Thanks to everyone that replied.


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" xmlns="http://schemas.microsoft.com/sharepoint/"...


2

You need to bring your new SharePoint environment up to at least the same patch level as the one that failed. An easy solution would be to apply the latest Service Pack and possibly the latest Cumulative Update to the new farm. Once that is done, you should be able to attach the old content database and it should upgrade as part of the attach.


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 stumbled across the enumallwebs operation and that seems to do the trick. For anyone looking, this command will give you the Sites in the collection and any sub webs contained in each and is completely recursive. It also lets you know the URL, LanguageID, TemplateName, TemplateID, and OwnerLogin. EXACTLY what I was looking for. Here is the link to the ...


2

The problem lies with the creation of 2 fields of User Type which were created using XML (Visual Studio). There fields were not provisioned correctly, the atrribute List="UserInfo" was not defined in the field definition. I've created the below script to fix this issue. Write-Host Adding SharePoint PowerShell Snapin Add-PSSnapin Microsoft.SharePoint....


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

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

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

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

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 probably due to a Custom User field that is incorrectly created. MOst possibly because of lack of setting the property List to "UserInfo". At least that was the case when i got this error. This post is talking about the exact same issue. The solution is tricker though, if the system is already in production. If not, just update your user field xml:s


1

Something isn't matching up here. Your error is about /custom/ross/, but your commands don't mention ross. Are you trying to create another site collection under custom? For you to create site collections, you need to use a managed path. By default, /sites/ is setup as a managed path on your web application (see Central Admin > Manage web applications > ...


1

You can use the stsadm deletetemplate stsadm -o deletetemplate -title <template title> [-lcid] <language> Sample Usage: stsadm –o deletetemplate –title YourTemplateName Peform an iisreset afterwards to ensure removal.


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