Just run the powershell_rv.py then just input the LHOST and LPORT and the payload will be generated.
C:\Users\breaching\Desktop> py .\powershell_rv.py
LHOST: 192.168.0.30
LPORT: 4444
Here is your payload: {PAYLOAD}
Note The powershell_rv.py file might flag Windows Defender tho.