Thanks for the screenshots! Running it from CMD or another terminal probably won't change anything. You ran the right command, and Defender is flagging the command itself, not where it was run.
I'm going to raise this with our team internally and will get back to you as soon as I have something. In the meantime, a bit more context would help us narrow it down:
Is this machine on a work network or VPN, or managed by an IT team?
Do you use any security software besides Windows Defender?
If you can, also send a screenshot of the entry in Windows Security > Protection history for this alert. And I'd hold off on re-running the install command until we've taken a look.