Alternatively, you can create a script that gets the latest folder in that path and pass it as a variable. For example, using batch (-scan -1 = quick scan, -2 would be full):
set WinSecDefndrPath="dir "C:\ProgramData\Microsoft\Windows Defender\Platform" /ad /od /b"
FOR /F "tokens=*" %%i IN (' %WinSecDefndrPath% ') Do Set WinSecDefndrPath=%%i
"C:\ProgramData\Microsoft\Windows Defender\Platform\%WinSecDefndrPath%\MpCmdRun.exe" -Scan -1