I am writing a post-image deployment script where one of the steps is to restore the SSRS encryption key that was lost after using sysprep to create the image.
Restoring the key using the GUI tool Report Server Configuration Manager works fine, attempting to restore the key via the following command:
RSKeyMgmt.exe -a -f d:\ssrs.snk -p <ThePassword> -i SQLEXPRESS
either an elevated PowerShell shell or elevated cmd shell yields the following error:
Unable to connect to the Reporting services instance sqlexpress. If you have a named instance consider running the command with -i .
My instance of SSRS is on a local SQL Server Express install, where the instance name is SQLEXPRESS. Am I correct that <instance name> should be SQLEXPRESS?
Here is what I tried without success:
- Run from the directory where RSKeyMgmt.exe is located.
- Tried the "remote" command line switches, using
localhostas the "remote" machine. Resulting error: Argument -M is not used with this management operation. (Presumably, the -a (apply) operation can only be run on a local installation of SSRS.) - Added the host name to the instance name, like localhost\sqlexpress or .\sqlexpress.
- Changed the case to match the instance name, like SQLEXPRESS.
I also ensured the following, as per Google's suggestions:
- TCP/IP is enabled to connect to SQL Server Express.
- telnet to the configured port.
- Change the port to 1433 in the TCP/IP protocol settings (and restart SQL Server service).
- SQL Server Browser is running.
- Rebooted.
The version of RSKeyMgmt.exe is 16.0.1116.12 x86
