..:: I like SharePoint ::.. Rotating Header Image

Administration

SharePoint Getting Log information for a datetime span with Powershell

That should be cool for SharePoint Administrators. If you would like to get all log information from the ULS log of SharePoint you can use this cool snippet with Powershell and insert the needed datetimes. It will save the information in a file.



 

Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue

Get-SPLogEvent -StartTime "05/06/2014 16:00" -EndTime "05/06/2014 16:30" > c:\Loginformation.log


There are many more options and it is also possible to get the windows event log in the same way. Just look at the links below:

http://technet.microsoft.com/de-de/library/ff607589%28v=office.15%29.aspx

https://dotnetmafia.sys-con.com/node/2264875/mobile

Run a Powershell Script with Task Scheduler

Powershell gives you many options to administrate your farm, but it also can help you to get certain jobs done regularly. In one of my customer projects it was necessary to copy a certain document from library A to library B each month on the same day.

We created therefore a small powershell script which does the job including logging. Now we added it to the windows task scheduler and configured it for our needs. In the action tab we added an action which starts a program. We typed in there powershell and added the powershell script as parameter.

Parameter: -file “C:\Users\pohnke\Downloads\CopyFileToAnotherLibrary.ps1″

psTask1

That’s all. The solution is simple and it took only a few minutes to get a working solution.

Another possibility would have been to develop a timer job in SharePoint with all following processes: Development, Testing, Install on Staging, Testing, Install on Production, Testing, Documentation, etc. which would take hours.

Great to have Powershell.

Fixing error when crawling websites, php based sites or mediawiki in SharePoint Search

SharePoint Search can also crawl a normal website or php sites. If you’re using a wiki which is based on php, you can also add it in your search index. But after you prepared everything like the authentification, you should also be aware that urls maybe case sensitive. If you do not pay attention you might get the following error:

The URL was permanently moved. ( URL redirected to http://site/pages/home.aspx)

I’ve found the solution in this post. You just add a crawl rule in the central administration. In the crawl rule you have to activate the checkbox for “Match Case”. After that do a full crawl and it should work.

Search

Hope it helps you.

What you should know about Word Automation Services in SharePoint to convert word to pdf

In multiple customer projects we had the requirement to convert word documents to pdf. There are really many ways to achieve this by using third party tools, OpenXML SDK and pdf rendering software or any other kind. SharePoint offers a so called Word Automation Service which can also transform your word document into pdf file. But this feature is only available at SharePoint Server Standard or higher. So 3rd party tools are great if you only use SharePoint Foundation.

In this post i assume that you have SharePoint Server Standard and i will write about the possibilities you have with the Word Automation Services (WAS). Let’s see what the input and output could be.

Source files types:

  • Open XML File Format documents (.docx, .docm, .dotx, .dotm).
  • Word 97-2003 documents (.doc, .dot).
  • Rich Text Format files (.rtf).
  • Single File Web Pages (.mht, .mhtml).
  • Word 2003 XML Documents (.xml).
  • Word XML Document (.xml)

Destination file types:

The supported destination document formats includes all of the supported source document formats, and the following.

  • Portable Document Format (.pdf)
  • Open XML Paper Specification (.xps)

In order to use it, you have to configure the word automation services as service application in SharePoint and it should be started. You can do it in the central administration in manage service applications. If you want to know the details of how it works i can recommend you to read this post. Here are also listed the limitations of WAS.

The big bang is, that there is no UI. What does it mean? Well, if you think that there is a button or context menu at each document or a feature which has to be activated now, you’re wrong. It is now possible to use it, but how? (more…)

SharePoint 2013 Service Pack 1 is back – New Version?

At the download page of Microsoft the Service Pack 1 for SharePoint 2013 is back again. It was disabled for the time, where the Service Pack encountered an error with upcoming patches. But now it is published at 17.04.201. There is no official release of Microsoft to that, but the enabled the download again.

http://www.microsoft.com/en-us/download/details.aspx?id=42544

It is recommended to do a check first in lab.