Have you had a look at the built-in "Change Default Audio Devices" action, which is intended to do just that, without needing external scripts?
If you do need to run a PowerShell script, you could try using the "Run an Application" action to start "PowerShell" with the "With these parameters" field set to "-File " followed by the path to your script (wrapped in double quotes if it contains spaces).