Starting the Document Conversion and Load Balancer Service and Document Conversion Launcher Service on SharePoint 2010 using PowerShell

During my training in SharePoint I’ve been tasked with scripting an install of SharePoint. I know that there are other installers out there, but I wanted to learn as much as I could about installing it the ‘hard’ way. I had most of my 2 server farm installed and working without touching the GUI once. (Well OK, just once – but I haven’t worked my way around that yet!)

In all of the Installer routines I found on the internet there wasn’t one that documented starting the pair of Document Conversion… services. So I had a try myself. Starting the first service, the Document Conversions Load Balancer Service wasn’t too hard. I simply issued*

Start-SPServiceInstance -Identity (Get-SPServiceInstance | where 
{$_.TypeName -eq "Document Conversions Load Balancer Service" -and $_.Parent.Name -eq “{servername}”})

* I know there is probably a simpler way of doing this but I’m new to this

Easy. So I thought it would be great to just start the other service in the same kind of way. So I tried. Great! The service started, but when I checked the settings I discovered that the Load Balancer property wasn’t set.

So, how do I set that property? Well I had a hunt around the internet and couldn’t find much, but I did find another soul out there with a similar problem, so similar in fact he inspired me to find my answer. His post http://social.technet.microsoft.com/Forums/en/sharepoint2010setup/thread/205b9f5e-9c32-49c2-ad47-4c2a0e97b4ea showed me that you can access the properties from the command line. I just had to find them.

I started this process by creating a ServiceInstance variable I could interrogate.

$launcher = Get-SPServiceInstance | ? {$_.typename –eq "Document Conversions Launcher Service"}

Then to interrogate the properties

$launcher | get-member -membertype property

Which returns this lovely list:

   TypeName: Microsoft.Office.Server.Conversions.LauncherServiceInstance

Name                        MemberType Definition
----                        ---------- ----------
CanUpgrade                  Property   System.Boolean CanUpgrade {get;}
Description                 Property   System.String Description {get;}
DisplayName                 Property   System.String DisplayName {get;}
Farm                        Property   Microsoft.SharePoint.Administration.S...
Hidden                      Property   System.Boolean Hidden {get;}
Id                          Property   System.Guid Id {get;set;}
Instance                    Property   System.String Instance {get;set;}
IsBackwardsCompatible       Property   Microsoft.SharePoint.TriState IsBackw...
LoadBalancerServerId        Property   System.Guid LoadBalancerServerId {get...
ManageLink                  Property   Microsoft.SharePoint.Administration.S...
Name                        Property   System.String Name {get;set;}
NeedsUpgrade                Property   System.Boolean NeedsUpgrade {get;set;}
NeedsUpgradeIncludeChildren Property   System.Boolean NeedsUpgradeIncludeChi...
Parent                      Property   Microsoft.SharePoint.Administration.S...
Port                        Property   System.Int32 Port {get;set;}
Properties                  Property   System.Collections.Hashtable Properti...
ProvisionLink               Property   Microsoft.SharePoint.Administration.S...
Roles                       Property   System.Collections.Generic.ICollectio...
Server                      Property   Microsoft.SharePoint.Administration.S...
Service                     Property   Microsoft.SharePoint.Administration.S...
SingleServer                Property   System.Boolean SingleServer {get;set;}
Status                      Property   Microsoft.SharePoint.Administration.S...
SystemService               Property   System.Boolean SystemService {get;}
TypeName                    Property   System.String TypeName {get;}
UnprovisionLink             Property   Microsoft.SharePoint.Administration.S...
UpgradeContext              Property   Microsoft.SharePoint.Upgrade.SPUpgrad...
UpgradedPersistedProperties Property   System.Collections.Hashtable Upgraded...
Version                     Property   System.Int64 Version {get;}

And here we have it!

LoadBalancerServerId        Property   System.Guid LoadBalancerServerId {get...

Ok, but it wants a System.Guid? Since the property wanted a server name I presumed it wanted the Guid of the server. After a bit more searching it turns out we can find a server Guid from the Get-SPServer commandlet.

$svrguid = (Get-SPServer | ? {$_.address -eq "{server name}"}).id

Now we have the Guid we can just set the property in the ServiceInstance variable and update the configuration

$launcher.LoadBalancerServerId = $svrguid
$launcher.update()

And finally we can start the service.

Start-SPServiceInstance -Identity (Get-SPServiceInstance | where 
{$_.TypeName -eq "Document Conversions Launcher Service" -and $_.Parent.Name -eq “{server name}”})

Viola! Both services are now configured and running.

 

As postscript, whilst I was working on this I kept getting the following error when I issued the update() command:

Exception calling “Update” with “0” argument(s): “An update conflict has occurred, and you must re-try this action. The object LauncherServiceInstance was updated by domain\adminuser, in the w3wp (3484) process, on machine SP2010.  View the tracing log for more information about the conflict.”

This was simply me making changes to the service outside PowerShell without creating a new copy of the $launcher ServiceInstance variable. Once I re-created the $launcher variable it all worked fine.

Starting the Document Conversion and Load Balancer Service and Document Conversion Launcher Service on SharePoint 2010 using PowerShell

During my training in SharePoint I’ve been tasked with scripting an install of SharePoint. I know that there are other installers out there, but I wanted to learn as much as I could about installing it the ‘hard’ way. I had most of my 2 server farm installed and working without touching the GUI once. (Well OK, just once – but I haven’t worked my way around that yet!)

In all of the Installer routines I found on the internet there wasn’t one that documented starting the pair of Document Conversion… services. So I had a try myself. Starting the first service, the Document Conversions Load Balancer Service wasn’t too hard. I simply issued*

Start-SPServiceInstance -Identity (Get-SPServiceInstance | where 
{$_.TypeName -eq "Document Conversions Load Balancer Service" -and $_.Parent.Name -eq “{servername}”})

* I know there is probably a simpler way of doing this but I’m new to this

Easy. So I thought it would be great to just start the other service in the same kind of way. So I tried. Great! The service started, but when I checked the settings I discovered that the Load Balancer property wasn’t set.

So, how do I set that property? Well I had a hunt around the internet and couldn’t find much, but I did find another soul out there with a similar problem, so similar in fact he inspired me to find my answer. His post http://social.technet.microsoft.com/Forums/en/sharepoint2010setup/thread/205b9f5e-9c32-49c2-ad47-4c2a0e97b4ea showed me that you can access the properties from the command line. I just had to find them.

I started this process by creating a ServiceInstance variable I could interrogate.

$launcher = Get-SPServiceInstance | ? {$_.typename –eq "Document Conversions Launcher Service"}

Then to interrogate the properties

$launcher | get-member -membertype property

Which returns this lovely list:

   TypeName: Microsoft.Office.Server.Conversions.LauncherServiceInstance

Name                        MemberType Definition
----                        ---------- ----------
CanUpgrade                  Property   System.Boolean CanUpgrade {get;}
Description                 Property   System.String Description {get;}
DisplayName                 Property   System.String DisplayName {get;}
Farm                        Property   Microsoft.SharePoint.Administration.S...
Hidden                      Property   System.Boolean Hidden {get;}
Id                          Property   System.Guid Id {get;set;}
Instance                    Property   System.String Instance {get;set;}
IsBackwardsCompatible       Property   Microsoft.SharePoint.TriState IsBackw...
LoadBalancerServerId        Property   System.Guid LoadBalancerServerId {get...
ManageLink                  Property   Microsoft.SharePoint.Administration.S...
Name                        Property   System.String Name {get;set;}
NeedsUpgrade                Property   System.Boolean NeedsUpgrade {get;set;}
NeedsUpgradeIncludeChildren Property   System.Boolean NeedsUpgradeIncludeChi...
Parent                      Property   Microsoft.SharePoint.Administration.S...
Port                        Property   System.Int32 Port {get;set;}
Properties                  Property   System.Collections.Hashtable Properti...
ProvisionLink               Property   Microsoft.SharePoint.Administration.S...
Roles                       Property   System.Collections.Generic.ICollectio...
Server                      Property   Microsoft.SharePoint.Administration.S...
Service                     Property   Microsoft.SharePoint.Administration.S...
SingleServer                Property   System.Boolean SingleServer {get;set;}
Status                      Property   Microsoft.SharePoint.Administration.S...
SystemService               Property   System.Boolean SystemService {get;}
TypeName                    Property   System.String TypeName {get;}
UnprovisionLink             Property   Microsoft.SharePoint.Administration.S...
UpgradeContext              Property   Microsoft.SharePoint.Upgrade.SPUpgrad...
UpgradedPersistedProperties Property   System.Collections.Hashtable Upgraded...
Version                     Property   System.Int64 Version {get;}

And here we have it!

LoadBalancerServerId        Property   System.Guid LoadBalancerServerId {get...

Ok, but it wants a System.Guid? Since the property wanted a server name I presumed it wanted the Guid of the server. After a bit more searching it turns out we can find a server Guid from the Get-SPServer commandlet.

$svrguid = (Get-SPServer | ? {$_.address -eq "{server name}"}).id

Now we have the Guid we can just set the property in the ServiceInstance variable and update the configuration

$launcher.LoadBalancerServerId = $svrguid
$launcher.update()

And finally we can start the service.

Start-SPServiceInstance -Identity (Get-SPServiceInstance | where 
{$_.TypeName -eq "Document Conversions Launcher Service" -and $_.Parent.Name -eq “{server name}”})

Viola! Both services are now configured and running.

 

As postscript, whilst I was working on this I kept getting the following error when I issued the update() command:

Exception calling “Update” with “0” argument(s): “An update conflict has occurred, and you must re-try this action. The object LauncherServiceInstance was updated by domain\adminuser, in the w3wp (3484) process, on machine SP2010.  View the tracing log for more information about the conflict.”

This was simply me making changes to the service outside PowerShell without creating a new copy of the $launcher ServiceInstance variable. Once I re-created the $launcher variable it all worked fine.