Cant get powershell script to run with subprocess

hi all,

i can run up a powershell command with subprocess fine but now im trying to get subprocess working with my powershell script but its not passing the variables

heres my py script

import subprocess

un = "username"
op = "oldpassword"
cnp = "newpassword"
dom = "robo84"

subprocess.run(f'powershell.exe C:\\python\\test.ps1' , shell=True)

ps1 script

write-host $un
write-host $op 
write-host $cnp 
write-host $dom

but when i run in cmd, it runs with no errors but i get 4 blank lines

thanks,
rob

ok solved

ps1 script

param (
[string]$un,
[string]$op,
[string]$cnp,
[string]$dom
)

write-host $un
write-host $op
write-host $cnp
write-host $dom

py script

import subprocess

un = "firstname.lastname"
op = "oldpassword"
cnp = "newpassword"
dom = "domain"

subprocess.run(f'powershell.exe C:\\python\\test.ps1 {un} {op} {cnp} {dom}', shell=True)