Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm in the process of Scripting a deployment of SharePoint 2010 and FAST.

Normally to set the Service Account of a SharePoint service one would use the ProcessIdentity property, like so:

$procId = (Get-SPSearchService).ProcessIdentity
$procId.CurrentIdentityType = "SpecificUser"
$procId.ManagedAccount = $myManagedAcount
$procId.Update()

This works a treat for the SearchService object returned by Get-SPSearchService, however the SearchService object returned by Get-SPEnterpriseSearchService has an additional ScriptProperty that hides the ProcessIdentity property, and returns it as a string, rather than an SPProcessIdentity, which can't be updated.

So, The question: Can I remove this ScriptProperty? OR Can I change the service account via PowerShell without access to the ProcessIdentity Property?

share|improve this question

3 Answers 3

You should use .Deploy() after .Update()

share|improve this answer
up vote 0 down vote accepted

After another day of banging my head against a wall I worked it out. Rather than attempting to access the masked property ProcessIdentity, you can access it with the property accessor get_ProcessIdentity() directly, like so:

$procId = (Get-SPEnterpriseSearchService).get_ProcessIdentity()
$procId.CurrentIdentityType = "SpecificUser"
$procId.ManagedAccount = $myManagedAcount
$procId.Update()

It's worth noting that this must be done before starting the service instances or it won't apply (unless there's an additional step I've missed?)

share|improve this answer
    
Good work mate, this code worked after I tried a few different things. –  user9228 Jul 1 '12 at 21:02

Seems to be tricky

according to this article :

there appear to be missing one key piece: setting the default content access account to some service account other than the SharePoint farm account.

share|improve this answer
    
The article you linked does everything for setting up the FAST Search Service applications EXCEPT the bit I'm trying to do. –  Neil White May 11 '12 at 13:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.