I tried this in my windows 10 command prompt but it doesn't work
The command you found in the tutorial was for PowerShell, not Command Prompt.
Windows 10 comes with two command interpreters: Cmd (the traditional "Command Prompt") and PowerShell. They have similar basic commands but very different syntax, with PowerShell trying to improve on Cmd's kludges dating from MS-DOS era. You'll find both in the Start Menu.
In Cmd (Command Prompt), you would set the same environment variable like this:
or like this:
Note: In Cmd, quoting just the value won't actually work the way you expect: the quotes will end up stored as part of the value. (You can see the result by running just
set SECRET_KEY or