OK, thanks Greg, this is easier than curl.
Chris, are you running the command from CMD / powershell or from Git Bash?
When running from Git Bash, I had to escape the projection name, like this:
jgough@JGOUGH /c/Program Files/eventstore
$ ./EventStore.PAdmin.exe enable $by_category admin changeit
Config file failed to load (Could not find file 'c:\Program Files\eventstore\pad
min.esconfig’.).
Should be located near exe file, named ‘padmin.esconfig’, key=value formatted).
Using defaults
Loading config values…
Enabling $by_category…
$by_category enabled
[29772,13,16:56:11.707] Enabling ‘$by_category’ projection
[29772,13,16:56:11.707] ‘$by_category’ projection source has been written
If I don’t escape it, the shell tries to find a variable named by_category, and that is missing so I get this:
$ ./EventStore.PAdmin.exe enable $by_category admin changeit
Config file failed to load (Could not find file 'c:\Program Files\eventstore\pad
min.esconfig’.).
Should be located near exe file, named ‘padmin.esconfig’, key=value formatted).
Using defaults
Loading config values…
Enabling …
padmin execution failed : System.ArgumentNullException: name
at EventStore.Padmin.Command.Enable(ProjectionsManager manager, String[] comm
andArgs) in c:\EventStore\src\EventStore.Padmin\Command.cs:line 16
at EventStore.Padmin.Program.Execute(ProjectionsManager manager, String[] arg
s) in c:\EventStore\src\EventStore.Padmin\Program.cs:line 98
at EventStore.Padmin.Program.TryExecute(Dictionary`2 config, String[] args) i
n c:\EventStore\src\EventStore.Padmin\Program.cs:line 81
The command works from CMD.exe without any escaping though.