upvar creates a link to variable in a different stack frame. namespace lets you create, access, and destroy separate contexts for commands and variables. apply applies an anonymous function (since 8.6). coroutine, yield, and yieldto create and produce values from coroutines (since 8.6). try lets you trap and process errors and exceptions.
If for some reason you cannot do that, you could consider using Write File activity to write your script to the remote machine (in preparation of execution) and then run an Execute Windows Command or Execute Windows PowerShell Script activity to run the script (from file) and then destroy the file.