Lösungen und Software-Entwicklung im Collaboration Umfeld, insbesondere Microsoft SharePoint, Microsoft Exchange und Microsoft Office.


Mobil: +49 (152) 53 97 78 79
Weitere Kontaktmöglichkeiten: Kontaktseite
Dekoration: Köln

Collecting ULS Data
Created: 29.07.2013
Categories: SharePoint 2010; SharePoint 2013

Samples for collecting ULS data from all servers:

Collect all data:
Merge-SPLogFile -Path C:\tmp\FarmLog.log

Collect all data with a correleation ID (remove line break):
Merge-SPLogFile -Path C:\tmp\FarmLog.log
  -Correlation b572479c-ce57-10ce-c901-ce456a0284dc

Collect all data within a timeframe (adjust regional time format, remove line break):
Merge-SPLogFile -Path C:\tmp\FarmLog.log
  -StartTime "28.07.2013 00:00" -EndTime "28.07.2013 23:59"


Send us a Comment!

SharePoint Warm-Up
Created: 19.07.2013
Categories: SharePoint 2010; SharePoint 2013

If you want to start your SharePoint web applications you can use the following
VisualBasic script as a warm-up for SharePoint. The code copies the host file
in order to reach each web front end server.
server1: "host-server1"
server2: "host-server2"
Plus "host-original" in order to move back
VBS Code:

' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' URL List

Dim urls(3)

Dim servers(2)
servers(1) = "server1"
servers(2) = "server2"

Dim PingReply
PingReply = "Reply from"

Dim TargetUrl
TargetUrl = "portal"

Dim outFile

' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'On error resume next

' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Code
dim fso
dim startTime
startTime = Now

AddToLog "------------------------------------------------"

set fso = CreateObject("Scripting.FileSystemObject")

For Each server in servers
  If server <> "" Then
    AddToLog "---------------- " & UCase(server)
    hostfile = "C:\Windows\System32\drivers\etc\hosts-" & server
    fso.CopyFile hostfile, "C:\Windows\System32\drivers\etc\hosts"
    PingResult TargetUrl
  End If

AddToLog "---------------- RESET"
fso.CopyFile "C:\Windows\System32\drivers\etc\hosts-original", "C:\Windows\System32\drivers\etc\hosts"
PingResult TargetUrl
set fso = Nothing

AddToLog "---------------- Summary"
minTime = UBound(urls) * UBound(servers) * 5
duration = datediff("s", startTime, now)
AddToLog "URLs: " & UBound(urls)
AddToLog "Minimal Time: " & minTime
AddToLog "Duration (s): " & duration
If duration > (minTime + 5) Then
  AddToLog "Warning!"
End If
AddToLog "------------------------------------------------"

' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Subs

sub WarmUp()
  dim ie
  set ie = CreateObject("InternetExplorer.Application")
  ie.Visible = 0

  For Each u1 In urls
    if u1 <> "" then
      AddToLog u1
      ie.Navigate2 u1
      Do while IE.readystate <> 4
    end if

  set ie = Nothing
end sub

sub DeleteLog()
  Set objFSOFile=CreateObject("Scripting.FileSystemObject")
  objFSOFile.DeleteFile outFile
end sub

sub AddToLog(txt)
  set objFSOFile=CreateObject("Scripting.FileSystemObject")
  set objFile = objFSOFile.OpenTextFile(outFile, 8, True)
  objFile.Write Now & " - " & txt & vbCrLf
  wscript.echo txt
end sub

sub PingResult(host)
  dim objShell
  dim objExec
  set objShell = CreateObject("WScript.Shell")
  set objExec = objShell.Exec("ping -n 1 -w 1000 " & host)
  pr = objExec.StdOut.ReadAll
  pr = mid(pr, InStr(pr, PingReply))
  pr = left(pr, InStr(pr, ":") - 1)
  AddToLog pr
  set objShell = Nothing
  set objExec = Nothing
end sub

You can use the script as a scheduled task. Use an account that has read access in the sites.

Alternative: Use IIS8 setting "AlwaysRunning" instead.
Not tested yet but this sounds promising: Post by Trevor Seward

Send us a Comment!

Site Archivar for SharePoint
Created: 10.05.2013
Categories: Collaboration-2-Go; SharePoint 2010; SharePoint 2013

Our third product is ready to buy: Site Archivar for SharePoint

Site Archivar for SharePoint

Site Archivar for SharePoint

Site Archivar for SharePoint

Send us a Comment!

Site Compass Light WebPart for SharePoint
Created: 25.10.2012
Categories: Collaboration-2-Go; SharePoint 2010

      Our second product is ready to buy: Site Compass Light Webart for SharePoint

      Site Compass Webart for SharePoint

Send us a Comment!

SharePoint Webpart Maintenance Page
Created: 15.10.2012
Categories: SharePoint 2007; SharePoint 2010

      In order to remove webparts from malfunctioning pages just add the following part to the URL:

      For example:


Send us a Comment!

Start and Stop SQL Server and SharePoint Services
Created: 06.10.2012
Categories: SharePoint 2010

      Start and stop SQL Server and SharePoint services e.g. on development machines.
      net start MSSQLSERVER
      net start SQLWriter
      net start IISADMIN
      net start W3SVC
      net start SPTraceV4
      net start OSearch14
      net start SPAdminV4
      net start SPTimerV4

      net stop SPTraceV4
      net stop OSearch14
      net stop SPAdminV4
      net stop SPTimerV4
      net stop MSSQLSERVER
      net stop SQLWriter
      net stop IISADMIN
      net stop W3SVC


Send us a Comment!

SharePoint CAML Query for Lookup Fields
Created: 27.09.2012
Categories: SharePoint 2010; SharePoint Development

      CAML query for a lookup field:
          <FieldRef Name='Name' />
          <Value Type='Lookup'>Smith</Value>

      CAML query for a lookup field using the ID:
          <FieldRef Name='Name' LookupId='True' />
          <Value Type='Lookup'>7</Value>


Send us a Comment!

Site Contact WebPart for SharePoint
Created: 02.09.2012
Categories: Collaboration-2-Go; SharePoint 2010

      Our first product is ready to buy: Site Contact Webart for SharePoint

      Site Contact WebPart for SharePoint

Send us a Comment!

SharePoint Field Definitions require Braces
Created: 10.10.2011
Categories: SharePoint Development; SharePoint 2010

      SharePoint Field definitions in Elements.xml require braces, e.g.
      Field ID="{9D6556BF-D5AC-41B7-94BA-56ABE77CEDC8}"

      Otherwise you get the following error message:
      Unable to locate the xml-definition for FieldName with FieldId '9D6556BF-D5AC-41B7-94BA-56ABE77CEDC8', exception: Microsoft.SharePoint.SPException ---> System.Runtime.InteropServices.COMException (0x8000FFFF): 0x8000ffff     at Microsoft.SharePoint.Library.SPRequestInternalClass.GetGlobalContentTypeXml(String bstrUrl, Int32 type, UInt32 lcid, Object varIdBytes)…

Send us a Comment!