This project has moved and is read-only. For the latest updates, please go here.

ERROR: Creating the Master Key...

Jun 16, 2011 at 12:53 PM


Great work on this fab script... :) 

Can some please help... For some reason I keep getting the following error when I try and run the AutoSPInstaller script. If I carry out this step manually it works fine, but for some reason doesn't work when using the script...

 I am creating 3 web applications using this script... Could this be the cause?

Web Applications:



 Any ideas???

:: ERROR::

- Creating the Master Key...

Update-SPSecureStoreMasterKey : The request channel timed out while waiting for

a reply after 00:00:59.9843796. Increase the timeout value passed to the call

to Request or increase the SendTimeout value on the Binding. The time allotted

to this operation may have been a portion of a longer timeout.

At D:\install\AutoSPInstaller\AutoSPInstallerFunctions.ps1:2155 char:34

+ Update-SPSecureStoreMasterKey <<<< -ServiceApplicationProxy $se

cureStore.Id -Passphrase "$FarmPassPhrase"

+ CategoryInfo : InvalidData: (Microsoft.Offic...eStoreMasterKey:

SPUpdateSPSecureStoreMasterKey) [Update-SPSecureStoreMasterKey], TimeoutEx


+ FullyQualifiedErrorId : Microsoft.Office.SecureStoreService.PowerShellCm



- Creating the Application Key...

- Creating the Application Key (2nd attempt)...

Update-SPSecureStoreApplicationServerKey : Master secret key is not present in

the database.

At D:\install\AutoSPInstaller\AutoSPInstallerFunctions.ps1:2162 char:45

+ Update-SPSecureStoreApplicationServerKey <<<< -ServiceApplic

ationProxy $secureStore.Id -Passphrase "$FarmPassPhrase"

+ CategoryInfo : InvalidData: (Microsoft.Offic...cationServerKey:

SPUpdateSPSecur...cationServerKey) [Update-SPSecureStoreApplicationServerK

ey], SecureStoreServiceException

+ FullyQualifiedErrorId : Microsoft.Office.SecureStoreService.PowerShellCm



- Done creating/configuring Secure Store Service Application.



Jun 16, 2011 at 1:38 PM
Edited Jun 16, 2011 at 1:40 PM

I have had that error an enourmus amout of times, and what I did, was to edit the script to run the command a second time:

			Write-Host " - Creating the Master Key..."
 			Update-SPSecureStoreMasterKey -ServiceApplicationProxy $secureStore.Id -Passphrase "$FarmPassPhrase"
			If (!$?)
				# Try again...
				Write-Host " - Creating the Master Key (2nd attempt)..."
				Update-SPSecureStoreMasterKey -ServiceApplicationProxy $secureStore.Id -Passphrase "$FarmPassPhrase"

I raised this a number of versions ago, but it seemed that I was the only one having the problem, and the above was never incorporated into the script...
maybe now? :-)

But, the above will work - if it fails the first time, it always succeds the second time around!


Jun 16, 2011 at 2:24 PM

Hi Jesper...

Thanks alot for the fix...

I hope that someone might add this to the script now that other people are experiancing the same error... :)

Jun 23, 2011 at 4:58 AM

Hey guys, I've implemented a simple Start-Sleep 5 time as suggested in and am testing it now.

Jesper, sorry for missing your suggestion previously! Maybe I'd never run into it myself or something. If the sleep timer suggestion doesn't work I'll definitely try your suggestion (similar to the existing Application Key re-run).


Feb 1, 2012 at 12:16 PM
Edited Feb 1, 2012 at 12:18 PM

instead of "Start-Sleep 5", you can also use these lines after the Update-SPSecureStoreMasterKey command.

stop-service -name "SPAdminV4"
Start-SPAdminJob -verbose
start-service -name "SPAdminV4"

In my farm, 5" wasn't enough:

$startdateUpdateSPSecureStoreMasterKey = get-date -Format 'yyyy-MM-dd-HH:mm:ss' 
write-host "Start Update-SPSecureStoreMasterKey $startdateUpdateSPSecureStoreMasterKey"

Update-SPSecureStoreMasterKey -ServiceApplicationProxy $secureStore.Id -Passphrase $FarmPassPhrase

stop-service -name "SPAdminV4"
Start-SPAdminJob -verbose
start-service -name "SPAdminV4"
$findateUpdateSPSecureStoreMasterKey = get-date -Format 'yyyy-MM-dd-HH:mm:ss'
write-host "End Update-SPSecureStoreMasterKey $findateUpdateSPSecureStoreMasterKey"

in the shell console i've got 8" of execution

Start Update-SPSecureStoreMasterKey 2012-02-01-11:37:19
VERBOSE: Leaving BeginProcessing Method of Start-SPAdminJob.
VERBOSE: Performing operation "Start-SPAdminJob" on Target
VERBOSE: Performing operation "Start-SPAdminJob" on Target
VERBOSE: Leaving ProcessRecord Method of Start-SPAdminJob.
VERBOSE: Leaving EndProcessing Method of Start-SPAdminJob.
End Update-SPSecureStoreMasterKey 2012-02-01-11:37:27