Friday, June 17, 2011

Let's try office 365 !

Office 365 is free for beta test here !

Connecting Lync client to OCS 2007 R2

Today, I've installed the brand new Lync client on my machine. But when I tried to connect to an OCS 2007 R2 server, I got an error telling that Lync is not compatible with OCS 2007.

I found the solution on this blog.

I just had to add this key in the registry base:
HKEY_CURRENT_USER\Software\Policies\Microsoft\Communicator
Name: DisableServerCheck
Type: DWORD
Value: 1 (00000001)

Enjoy ;-)

Wednesday, March 30, 2011

Start/Stop a SharePoint 2010 Service Application

Sometimes, it can be useful and more efficient to handle Sharepoint Service applications using Powershell.
The following script can be used for starting or stopping a service application instance.

A Sharepoint Service application is running behind a service application instance. This instance represents the service application on the whole Sharepoint Farm.
Stopping the instance will stop the related service application on all the servers in the farm.

First of all, we need to get all the service instances running on the farm:
Get-SPServiceInstance

From the list, select your service instance GUID and copy it.
For stopping the service instance, you just need now to run the Stop-SPServiceInstance command:
Stop-SPServiceInstance -Identity "YourServiceGUID"

Type "Y" when prompted.

Start-SPServiceInstance can be used using the same manner for starting the service again.

Attach Visual Studio to an application using Powershell

This script can be used to run the Visual Studio just in time debugger for debugging your website. It gets the name of the application pool running the website and then attach the JIT to the w3wp process.

$filter = "*MyWebsite*"

$w3wp = get-WmiObject Win32_Process -Filter "Name='w3wp.exe'"
$prid = $w3wp | where { $_.CommandLine -like $filter }

c:\Windows\System32\vsjitdebugger.exe -p $prid.ProcessId