Collaboration-2-Go


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

Support


Mobil: +49 (152) 53 97 78 79
Mail: service@collaboration-2-go.de
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)
urls(1)="https://portal/sites/project1"
urls(2)="https://portal/sites/project2"
urls(3)="https://portal/sites/project3"

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

Dim PingReply
PingReply = "Reply from"

Dim TargetUrl
TargetUrl = "portal"

Dim outFile
outFile="c:\WarmUp\WarmUp2013.log"

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

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

'DeleteLog
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
    WarmUp()
  End If
Next

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
      WScript.Sleep(5000)
      Do while IE.readystate <> 4
      loop
    end if
  Next

  ie.Quit
  set ie = Nothing
end sub

sub DeleteLog()
  outFile="c:\svn\WarmUp2013.log"
  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
  objFile.Close
  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:
      
      ?Contents=1
      

      For example:
      
      http://collaboration/SitePages/Homepage.aspx?Contents=1
      

    

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.
      
      Start:
      
      net start MSSQLSERVER
      net start SQLWriter
      net start IISADMIN
      net start W3SVC
      net start SPTraceV4
      net start OSearch14
      net start SPAdminV4
      net start SPTimerV4
      


      Stop:
      
      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:
      
      <Where>
        <Eq>
          <FieldRef Name='Name' />
          <Value Type='Lookup'>Smith</Value>
        </Eq>
      </Where>
      

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

    

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!