Donnerstag, 3. Februar 2011

Duet Enterprise for SharePoint and SAP

Vorbei ist er - der Virtual Launch Event zu Duet Enterprise for SharePoint und SAP am 01. Februar 2010! Dabei sollte keiner, der sich schon den Kopf über SAP und SharePoint in der gleichen Problemstellung zerbrochen hat, sich voraussichtlich noch zerbrechen wird oder sich den Kopf von anderen Leuten darüber zerbrechen wird, dieses Event verpaßt haben. Ups, doch verpaßt? :-) Nicht schlimm, schnell hier anschauen:

http://www.duetenterprisesummit.com/SitePages/Agenda.aspx

Noch nie etwas von Duet Enterprise gehört? Das ist schnell erklärt:

Das, was Duet Enterprise ausmacht ist der Pfeil zwischen SAP NetWeaver und SharePoint. Der verbindet nämlich das Duet Enterprise SAP Add-on mit dem Duet Eterprise SharePoint Add-on. Und das bietet tolle Vorteile für ansonsten Recht interessante Dinge wie:
  • Single Sign On SAP Benutzer und Windows Benutzer,
  • Business Connectivity Services Entitäten OOTB, 
  • ...
 Somit sollte man in der Lage sein, ziemlich schnell sowas wie unten auf dem Bild zu basteln:

SAP HR, Empoyee Self Services in SharePoint? Kein Problem, Duet Enterprise ist ja jetzt mehr Framework als fertige Prozesse aus Duet 3.5 Zeiten... Also, schnell noch den Virtual Launch Event anschauen!

Good luck,

Andreas

Dokumente von Filesystem automatisch nach SharePoint importieren

Hallo zusammen,

anbei ein kleines PowerShell Skript, dass alle Dateien aus einem Ordner des Filesystems in eine SharePoint Liste importiert. Mir hat das Skript schon oft geholfen, ob als Hilfe für Datenmigration oder ob als geplanter Windows Tasks, der frisch eingescannte Dokumente regelmäßig importiert. Natürlich ist es möglich, automatisch Metadaten an die neu nach SharePoint hinzugefügten Dokumente anzufügen oder den Ersteller oder das Erstellungs-Datum vom Filesystem nach SharePoint zu importieren - aber Ihr werdet da schon die nötige Phantasie mitbringen :-)

  1. if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null)   
  2. {   
  3.     Add-PSSnapin Microsoft.SharePoint.PowerShell   
  4. }   
  5.   
  6. $web = Get-SPWeb -Identity "http://sites/web/" ### Set your web URL   
  7. $folder = $web.GetFolder("http://site/web/list") ### Set your List URL here   
  8.   
  9.     foreach ($file in Get-ChildItem -Path "c:\folderwithdocuments") ### Set the location path of the folder with the documents here   
  10.     {   
  11.         $bytes  = [System.IO.File]::ReadAllBytes($file.Fullname)   
  12.         $SPDoc = $folder.Files.Add($file.Name,$bytes,$true)   
  13.         $SPDoc.Update()   
  14.         WRITE-HOST $file.FullName + " successfully added!" -ForegroundColor Green   
  15.     }   
  16. $web.Dispose()  

Ich hoffe es hilft!

Good luck,

Andreas

Donnerstag, 27. Januar 2011

SharePoint Cumulative Update ( CU ) December

Das CU Dezember für SharePoint 2010 ist nun schon ein paar Wochen verfügbar. Finden tut man das ganze unter der offiziellen Microsoft Seite Updates for SharePoint 2010 Products. Dort kann man sich immer das neuste Material herunterladen. Den Post schreib ich aber nur, um euch auf den folgenden Satz aufmerksam zu machen, der unter dem CU December steht:

Note: You must restart the User Profile Synchronization service after installing this cumulative update. For more information see the Start the User Profile Synchronization service section in the Configure profile synchronization article in the library.

Also nicht vergessen, den Benutzerprofil-Synchronisationsdienst neu zu starten!

Good luck,

Andreas

P.S.: Schon gewußt, dass man den Konfig-Wizard nach der Installation von CUs und SPs nicht mehr nach einander auf jedem Server ausführen muss? Einfach
psconfig –cmd upgrade –inplace b2b -wait
auf jedem Server in der Kommando-Zeile aufrufen!

Mittwoch, 26. Januar 2011

Office Web Apps Administration

Hi,

alle wichtigen Office Dokumente im Browser anschauen - unabhängig von der Client Version. Mit Office Web Apps und SharePoint 2010 ist dieses Szenario sehr einfach realisiert. Die Installation und Konfiguration der Dienstanwendungen in SharePoint ist kein nennenswerter Aufwand. Auch die Administration ist für einen SharePoint Admin keine sehr großer Bedrohung - wenn man denn weiß was zu tun ist :-) Eine der Stellschrauben, die all zu oft vergessen werden ist der Cache der Office Web Apps. Office Web Apps laden jedes aufgerufene Dokument in den Cache - das erhöht die Geschwindigkeit des Renderings wesentlich! Nun kann man sich vorstellen, dass der Cache recht schnell einiges an Platz auf der Platte nimmt. Diesen Platz gilt es im Auge und unter Kontrolle zu halten!
Dafür gibt es einen lesenswerten TechNet Artikel. Zusammengefasst gilt es folgendes zu beachten:
  • Der Cache wird einmal pro Webanwendung angelegt,
  • der Cache wird automatisch in eine Websitesammlung abgelegt und somit in eine SharePoint Inhaltsdatenbank.
Eingestellt werden kann am Office Web Apps Cache:
  • Die maximale Größe,
  • das Ablaufdatum.
Mit beiden Einstellungen kann man schon dafür sorgen, dass einem der Cache nicht über den Kopf wächst. Nun will man den Cache aber auch nicht unbedingt in seiner produktiven Inhaltsdatenbank und somit auf seinen Datenbanksicherungen. Daher sollte in der Routine zum Anlegen einer neuen Webanwendung direkt enthalten sein, den Office Web Apps Cache in eine eigene Inhaltsdatenbank umzuziehen. Das kann man natürlich mit der PowerShell erledigen ( wie es der Artikel schon sehr gut beschreibt ).

Ich habe mir folgendes Skript daraus geschrieben, mit dem jeder Admin in der Lage sein sollte, die Wartung des Web Apps Caches vorzunehmen ohne sich die einzelnen Befehle suchen und bearbeiten zu müssen.




  1. if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null)   
  2. {   
  3.     Add-PSSnapin Microsoft.SharePoint.PowerShell   
  4. }   
  5.   
  6.     $webAppUrl = Read-Host "URL of the Webapplication"  
  7.     $DBServer = Read-Host "Database Server"  
  8.     $CacheSize = Read-Host "Max Cache Size GB"  
  9.     $expirationDays = Read-Host "Expiration Period in Days"  
  10.        
  11.     Write-Host "..."  
  12.     Write-Host "Your Web Application: " -nonewline; Write-Host $webAppUrl -ForegroundColor Yellow    
  13.     Write-Host "Your Database Server: " -nonewline; Write-Host $DBServer -ForegroundColor Yellow    
  14.     Write-Host "Your Cache Size in GB: " -nonewline; Write-Host $CacheSize -ForegroundColor Yellow   
  15.     Write-Host "Your Expiration Time in days: " -nonewline; Write-Host $expirationDays -ForegroundColor Yellow   
  16.     Write-Host "..."  
  17.     $continue = Read-Host "Please confirm your input (y/n)"  
  18.   
  19.     if($continue -eq "y")   
  20.     {   
  21.         $webapp = Get-SPWebApplication -Identity $webAppUrl   
  22.         $DBName = "WSS_CONTENT_OfficeWebAppsCache_" + $webApp.Name   
  23.   
  24.         $newDB = New-SPContentDatabase -Name $DBName -WebApplication $webAppUrl -DatabaseServer $DBServer -MaxSiteCount 1 -WarningSiteCount 0   
  25.         Write-Host "New Content DB " -nonewline; Write-Host $DBname -ForegroundColor Yellow -NoNewline; Write-Host " created for Web Application " -nonewline; Write-Host $webapp.Name -ForegroundColor Yellow -NoNewline; Write-Host " on Database Server " -nonewline; Write-Host $DBServer -ForegroundColor Yellow -NoNewline; Write-Host "..."  
  26.         Get-SPOfficeWebAppsCache -WebApplication $webAppUrl | Move-SPSite -DestinationDatabase $newDB   
  27.         Write-Host "Move Office WebApps Cache Site Collection successfully to new ContentDB..."  
  28.         $GBSizeInBytes = 1024 * 1024 * 1024 * $CacheSize   
  29.         Get-SPWebApplication | Set-SPOfficeWebAppsCache -ExpirationPeriodInDays $expirationDays -MaxSizeInBytes $GBSizeInBytes   
  30.         Write-Host "Cache Byte Limit is set to " -nonewline; Write-Host $GBSizeInBytes -ForegroundColor Yellow -NoNewline; Write-Host " and Expiration Time to " -nonewline; Write-Host $expirationDays -ForegroundColor Yellow -NoNewline; Write-Host " days..."  
  31.         Write-Host "Operation completed successfully..." -ForegroundColor Green   
  32.     }   
  33.     else  
  34.     {   
  35.         Write-Host "The operation was chanceled by user input..." -ForegroundColor Red   
  36.     }   
Greift zu und speichert das Skript einfach als PS1 Datei ab. Aufrufen könnt Ihr es dann in der PowerShell mit dem Befehl C:\<Pfad>\<Dateiname>.ps1 .


Hoffentlich hilfts :-)

Good luck,

Andreas

Dienstag, 25. Januar 2011

SharePoint 2010 WarmUp Script

In der 2007er Version von SharePoint war ein WarmUp Skript für SharePoint, zum Beispiel dieses von Joel Oleson, Standard. Denn schon damals hatte es der IIS 6.0 an sich, die Webanwendungen Nachts zu recyclen und somit den Cache zu leeren. Der erste Seitenaufruf einer SharePoint-Seite ist nach dem leeren des Caches sehr langsam. Diese Problemstellung hat sich in Zeiten von IIS 7.5 und SharePoint 2010 nicht geändert. Nun gibt es ja für den IIS 7.5 WarmUp Plugin, für dessen Uninstall ich auch schon einen Blogpost geschrieben habe :-)
Die große Preisfrage ist: Was hab ich getan, nachdem das Plugin weg war? Ganz einfach, ich habe ein PowerShell Skript geschrieben, das durch jedes Web iteriert und über eine Webrequest jede Seite einmal aufruft. Das Skript wird durch eine geplante Windows Aufgabe von einem SharePoint Server ausgeführt.
Eine einfache Version eines solchen Skripts sieht folgendermaßen aus:



  1. Add-PsSnapin Microsoft.SharePoint.PowerShell -erroraction silentlycontinue  
  2.   
  3.  foreach ($webApp in get-SPWebApplication)  
  4.     {      
  5.         foreach ($site in $webApp.Sites)  
  6.         {  
  7.             foreach ($web in get-SPWeb -site $site)  
  8.             {  
  9.                 $request = [System.Net.WebRequest]::Create($web.URL)  
  10.                 $request.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials  
  11.                 $request.proxy = [System.Net.WebRequest]::DefaultWebProxy  
  12.                 $request.ContentType = "application/x-www-form-urlencoded"  
  13.                 $request.Method = "GET"  
  14.         try{  
  15.                     $request.GetResponse().StatusCode  
  16.             WRITE-HOST $request.GetResponse().StatusCode  
  17.                 }  
  18.                 catch [Net.WebException]{  
  19.                     $WebExceptionMessage = $_.Exception.Message  
  20.                     WRITE-HOST "Folgender Fehler ist aufgetreteb: " + $WebExceptionMessage  
  21.                 }  
  22.             }  
  23.         }  
  24.     }  
Im Gegensatz zu den Skripts, die ich beim meiner ersten Suche gefunden habe ist das oben erfrischend simpel und lädt zur phantasievollen Weiterentwicklung ein. Wer das ganze eher pragmatisch angeht, kopiert einfach den Code oben in eine Textdatei, speichert diese mit der Endung "ps1" und führt diese ps1 als Aktion im geplanten Windows Tasks einmal die Nacht nach zwei Uhr morgens aus. Beachtet dabei, dass das Skript nur auf einem SharePoint Server ausgeführt werden kann.

Good luck,

Andreas







Montag, 17. Januar 2011

IIS 7.5 Application Warm-Up Uninstall

Für IIS 7.5 findet man hier ein nettes WarmUp Tool:  Download IIS 7.5 Application Warm-Up . Dieses Tool ermöglicht es einem Administrator, den ersten Benutzer am frühen Morgen nach dem nächtlichen Application Recycle des IIS trotzdem eine angenehm schnelle SharePoint Erfahrung zu ermöglichen. Zu den alten IIS 6.0 und SharePoint 2007 Zeiten hatte man noch Skripts eingesetzt, um nach einem Reset des IIS die SharePoint-Seiten einmal in den Cache zu laden. Das IIS Tool aus dem Hause Microsoft ermöglicht nun eine Konfiguration über die IIS Manager Oberfläche. Man findet zahlreiche gute Blog-Einträge die das Vorgehen hierzu beschreiben, zum Beispiel hier.

Das Einrichten ist denkbar einfach, ebenso die Deinstallation des Tools. Leider ist die Konfiguration auch nach der Deinstallation noch in der web.config der SharePoint-Webanwendungen. Zur Freude eines jeden SharePoint Admins führt eine invalide web.config von SharePoint bei jedem Seitenaufruf zu folgendem Fehler:

HTTP Error 500.19 - Internal Server ErrorThe requested page cannot be accessed because the related configuration data for the page is invalid.Detailed Error Information

Um den Fehler zu beseitigen, muss man jede web.config von Hand anpassen und den Knoten "httpWarmup" in jeder web.config suchen und entfernen. 


Good luck,

Andreas 

Mittwoch, 20. Oktober 2010

Connect to Office - the easiest way to work with documents!

Hi,

today I've teached my students about the "Connect to Office"- Button in the SharePoint 2010. I don't know any student how is not sold on this button - and they are all right! This button is one of the best buttons you can use in SharePoint! OK, before I told you why, i told you how it works.
 You have a document library with several Content Types, two Word Documents and an Excel Sheet.


Fine, and know you push THE button. Choose "Add to SharePoint Sites" under "Connect to Office" in the Ribbon toolbar.

Confirm the dialog box following on your click and open your local Word or Excel and choose "New" like the way you do for creating a Document outside of SharePoint. You would found a new category " templates" with the document library you added before in SharePoint.

Click on it and you see the Content Types from the library in word. Of course, you'll found the Excel Sheet Content Type in your local Excel Client.

To open the Content Type now in Word isn't differently to open it from SharePoint. You can use custom templates as well as the Server Document Properties. And the default Save Location is the SharePoint Library, not your local Filesystem.


As you see- this is the way you can take SharePoint Content Types to your local Word with all the custom templates and Document Properties and all of this stuff. And -yes -, the Content Types works offline- even if the Save Location isn't SharePoint, of course!
But the best argument for this feature is, that this feature makes the handling with documents really more easy. Without a connect to a SharePoint Site, the user has two option:

  1. The user starts his Word Client, create a document, search a location (SharePoint or FileSystem) and load the Document to this location,
  2. or the user search the location in SharePoint and create his document at this position.
With the connect, the user don't have to search a location...

Regards,

Andreas