When using the scripting driver script service (which keeps powershell
loaded persistently to improve performance) you need to create an
additional config file: scriptservice.conf and a -command parameter that
specifies any commands that should be run prior as part of all
powershell scripts initiated by the script service.

For Exchange 2007, the -command parameter is:

-command Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin

My question is, can anyone confirm what the best/recommended -command
parameter for Exchange 2010?

Some googling has told me that the following would probably work (but
is not the supported way because it bypasses remoting and rbac):

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
. $env:ExchangeInstallPath\bin\RemoteExchange.ps1
Connect-ExchangeServer -auto

I've also seen suggested that the following is the "officially
supported Microsoft way, that uses remoting, doesn't require the
Exchange 2010 management tools installed on the local machine and
supports RBAC):

$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://ex01.exchange.lab/PowerShell/ -Authentication Kerberos
Import-PSSession $s

I don't like that with this "official method" you need to specify the
URI in your connection string. Is it possible to have this be auto

Has anyone got this working? If so what command parameters are you

alexmchugh's Profile: http://forums.novell.com/member.php?userid=40344
View this thread: http://forums.novell.com/showthread.php?t=441598