http://docs.octopusdeploy.com/display/OD/Security+and+encryption
For the PowerShell on this page it doesn’t mention that if you aren’t using the default instance you need to supply the instance name. It also doesn’t mention that with all the extra garbage that gets printed to the screen when calling Octopus.Server.exe you probably want to add --console --nologo --noconsolelogging
to the end of your command after --instance $instanceName
otherwise you will have a hard time isolating the master key in a programmatic manner. The old way of using a [arrayIndex] was failing for me on 3.7.x.