Table of Contents

Applications - Authentication - SecurEnvoy - Notes

PowerShell

ERR, Failed to get masterkey

Probem description

On Windows Server 2008 R2 the following works:

[Reflection.Assembly]::LoadFile(“C:\Program Files (x86)\SecurEnvoy\Security Server\ADMIN\adminAPI.dll")

[Reflection.Assembly]::LoadFile(“C:\Program Files (x86)\SecurEnvoy\Security Server\ADMIN\Interop.CAPICOM.dll")

[Reflection.Assembly]::LoadFile(“C:\Program Files (x86)\SecurEnvoy\Security Server\ADMIN\Interop.CHILKATENCRYPTLib.dll")

$objSecurEnvoyAdmin = New-Object securenvoy.admin
$objSecurEnvoyAdmin

But the following:

$objSecurEnvoyAdmin.listuser($objSecurEnvoyAdmin.getdn("user.name")

Gives the error:

ERR, Failed to get masterkey

Solution

Check if PowerShell v3 (or higher) is installed.
If PowerShell v3 (or higher) is not installed, install it with KB2506143.