Powershell session.putfiles: Getting 'Host "hostname sourcefile destfile" does not exist'
I am using the Powershell putfile example, with a few changes, and wrapped in a function. When I call $session.putfiles I get a strange error (sanitized):
Host "hostname.domain c:\localpath\localfile /remotepath/remotefile" does not exist.
I only need to copy one file and it exists on the remote side, but I think I read that overwrite is true by default. I had a wildcard in the source originally, but I changed it to have the exact filename.
I know that the host exists, because steps in the script before the call to copy the file work with the same variables. Let me know if you need me to include my code.
Thanks,
David Griswold
Host "hostname.domain c:\localpath\localfile /remotepath/remotefile" does not exist.
I only need to copy one file and it exists on the remote side, but I think I read that overwrite is true by default. I had a wildcard in the source originally, but I changed it to have the exact filename.
I know that the host exists, because steps in the script before the call to copy the file work with the same variables. Let me know if you need me to include my code.
Thanks,
David Griswold