This looks solid. I compiled the program and will try it out on my ducky later! A small pro tip, you need to escape quotation marks if they appear in your script. Like so:
pInstance.AddScript("powershell -w 1 -C \"sv SS...."
Or it won't compile correctly.
Thanks for this. I will update later.