Cannot execute files outside of configured plugin directory

Hi all!
Please help me

I have Vault 1.11.0 on Windows (for dev).
I cannot register plugin.

Plugin directory set to

2022-07-02T13:29:34.641+0300 [INFO]  core: Recorded vault version: vault version=1.11.0 upgrade time="2022-07-02 10:29:34.6359322 +0000 UTC" build date=2022-06-17T15:48:44Z
2022-07-02T13:29:34.641+0300 [INFO]  core: upgrading plugin information: plugins=[]
2022-07-02T13:29:34.641+0300 [INFO]  core: successfully setup plugin catalog: plugin-directory=c:\tools\vault\plugins

Plugin file is exist.

PS C:\tools\vault> test-path C:\tools\vault\plugins\vault-secrets-gen.exe
True

Vault is unseal.

PS C:\tools\vault> .\vault.exe status
Key                     Value
---                     -----
Seal Type               shamir
Initialized             true
Sealed                  false
Total Shares            1
Threshold               1
Version                 1.11.0
Build Date              2022-06-17T15:48:44Z
Storage Type            raft
Cluster Name            vault-cluster-58c94da6
Cluster ID              b3fa53b6-af31-8c9f-24fa-06dde5071f0e
HA Enabled              true
HA Cluster              https://localhost:8201
HA Mode                 active
Active Since            2022-07-02T10:29:34.6328399Z
Raft Committed Index    43
Raft Applied Index      43

But on register plugin

PS C:\tools\vault> ./vault plugin register -sha256="$((Get-FileHash c:\tools\vault\plugins\vault-secrets-gen.exe).hash)" -command="vault-secrets-gen.exe" secret secrets-gen
Error registering plugin secrets-gen: Error making API request.

URL: PUT https://127.0.0.1:8200/v1/sys/plugins/catalog/secret/secrets-gen
Code: 500. Errors:

* 1 error occurred:
        * cannot execute files outside of configured plugin directory

What I do wrong?

I don’t use Vault on Windows so I can’t say if the paths work or not, but you are using two different names for your plugin. With and without “vault-”.

I was use -command options. Or this is wrong?
But ok, i register plugins with this command

 ./vault plugin register -sha256="$((Get-FileHash c:\tools\vault\plugins\vault-secrets-gen.exe).hash)" secret vault-secrets-gen.exe

Thanks a lot