Showing posts with label SharePoint. Show all posts
Showing posts with label SharePoint. Show all posts

Sunday, June 24, 2012

New CAML Designer is released !

All of us know U2U CAML Builder and all of us encountered on bugs of it.
So, Karine Bosch noticed on release of new version of CAML Designer.

I hope it will help us - SharePoint Developers




Sunday, March 25, 2012

Enable/Disable feature - SharePoint 2010 PowerShell

Some times you need just enable /disable feature .
So for me the good way is doing by PowerShell :

1. Get all installed features to the text file:

Get-SPFeature | Sort -Property Scope,DisplayName | FT -GroupBy Scope DisplayName,Id > c:\AllInstalledFeatures.txt

2. Go to the c:\AllInstalledFeatures.txt and find the relevant feature. Copy the guid.

3. Enable Feature:

Enable-SPFeature -identity "cdd0d039-d2d2-40c8-81fc-0d5657fc2962" -URL http://contoso.com

4. Disable Feature:

Disable-SPFeature -identity "cdd0d039-d2d2-40c8-81fc-0d5657fc2962" -URL http://contoso.com

Wednesday, March 21, 2012

Backup - Restore Content Database to another farm SharePoint 2010 Power Shell

We need few steps to do it:
1. Backup data from source.
For this we need check which database we use for this web application









and backup the database:
From the SQL Server that your SharePoint farm users and where the instance of DB resides, backup the database.





2.Restore the database to the destination :
Take the backup file to the target SharePoint Farm's SQL Server (where we want to restore it to) and restore the database









Now we have a new content database, but we need to connect it to our SP.
Therefore we open SP Powershell :
3. Dismount old database:

Dismount-SPContentDatabase "Contoso_PortalContent_Old"

4. Mount new :
Mount-SPContentDatabase " Contoso_PortalContent_New" -DatabaseServer "contoso_db" -WebApplication http://contoso.com

Monday, March 19, 2012

SharePoint Power Shell Commands for adding solutions

Adding Solution:

Add-SPSolution "C:\WebPart.wsp"

Installing Solution:

Install-SPSolution –Identity WebPart.wsp –WebApplication http://contoso.com -GACDeployment


Update Solution if exists:

Update-SPSolution –Identity WebPart .wsp –LiteralPath “C:\WebPart .wsp” –GACDeployment

Monday, September 26, 2011

Show Created Date in a result of search center

One of my customers asked me to put created date instead of modified. The solution which I wrote below , maybe is not beautiful, but it works.

First of all, I needed to map managed property in the Central Administration:

Search Service Application -> Metadata Property Mappings :

"New managed property" , for me it was ''CreatedDate" and I needed to map it.

I found some answer in the internet : Article ,
but in my situation it returned 1/1/1601. Therefore , mapped all of the fields from the article separately. So, for me it was Basic:15 - the right result. But for everyone it differences.

And, of course, after do it, I had to run full crawl.


When I did all these things, I needed to edit the search results web part :

1.Insert to "Fetched Properties" new Column "CreatedDate"

2.Insert to the "XSL Editor" new template for CreatedDate


It's all for this time.