You can install g++ in Windows, too. On Mac, it was installed from its software repositories. In Windows, there are several distributions of that compiler, often bundled with some basic Unix-like environment, e.g. MSYS2, Cygwin, or MinGW (consult Google for details on these). You just need to choose and install one of them.
An easy way how to start is to download and unpack the last version of MinGW-w64. You will find the compiler g++.exe inside. Then, in PowerShell, simply use the full path to the executable, for example something like
C:\mingw64\bin\g++.exe prog.cpp -o prog.exe
depending on where you unpacked the package.
Note that you will need to copy a few DLLs (libstdc++.dll, maybe others, depending on features that you use) from the directory with g++.exe into the directory with your compiled program to be able to execute it.