> ...firefox.exe" -P "profilename"
and then `taskbar.grouping.useprofile true` so only windows from the same profile are grouped together and some custom recolored Firefox icons for those pinned shortcuts and custom per-profile userChrome.css styling (#TabsToolbar background-color) for easy visual differentiation of a window's profile.
For Windows 10, no scripting is needed. Just the initial GUI profile setup.
> ...firefox.exe" -P "profilename" "https://www.example.com"
from terminal works exactly as expected regardless of how many profile instances are currently running or their state.
You can even have multiple versions of Firefox installed and point them at different profiles. I have some profiles on ESR and some on Standard.