Ok obviously I do not understand where this is supposed to go. I did not mean to have the = 1 on the end. When I cut and pasted it I copied the wrong thing. My code does not have the = 1 on it. Where am I supposed to put the:

$RC=RedirectOutput ("\\AFNBLFSRV1\INVLOG\@HOSTNAME.CSV")