configuring exchange powershell hub transport rule script

I am working on a script to create multiple hub transport rules in Exchange 2010.

My code is:

foreach ($name in $names) {
set-transportrule -identity “export” + $name + “test redirect domain1 to domain2” -sentto=$ -redirectmessageto=$name -state=disabled

Is my set-transportrule line written correctly?? (in terms of syntax??)
I know the other lines are syntactically correct (array, foreach)
This is a multi-line script. Do I start it as a *.ps1 script inside the Exchange PS Shell, or what??
Thank you, Tom

I got it now…
#Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
foreach ($name in $names) {
new-transportrule “export $name test redirect mls to mso” -sentto “$” -redirectmessageto “$
#set-transportrule -identity “$name test redirect mls to mso” -redirectmessageto “$
disable-transportrule “export $name test redirect mls to mso” -force
Now to play with it more etc.
Thank you, Tom