Copy file from Server to MID server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2016 10:22 AM
I am trying to copy a file or directory from a Windows server to my Windows MID server. Using a simple Powershell activity where the credential vault has an account that is a local admin on both servers.
Copy-Item -path \\server1\d$\reports\test.txt -destination \\server2\d$\reports\test.txt -verbose -credential $cred
yields this error altho I know the file is there.
Copy-Item : Cannot find path '\\server1\d$\reports\' because it does not exist.
I have struggled with this a lot and wonder if someone can help me out.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2016 01:37 AM
Hi James,
What happens if you remove the "server" part from the "destination" i.e. make it a "local" file system?
As the command is being run on the MID server itself, you should not require the "server" in the command and can just specify the local file system.
From:
Copy-Item -path \\server1\d$\reports\test.txt -destination \\server2\d$\reports\test.txt -verbose -credential $cred
To something like:
Copy-Item -path \\server1\d$\reports\test.txt -destination \d$\reports\test.txt -verbose -credential $cred
Does that change the behaviour in any way?
Just wondering if by specifying 2 x servers in the command is causing the issue.
Is it possible to login to the MID server host using the credentials as used for "server1"?
Does an affinity record exist for the MID server host for the credentials you are using?
All the best,
Tony Alldis
*Please mark this Post as: Helpful, Like, or Correct Answer if applicable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2016 06:58 AM
By Default, Any command that is run on MidServer it uses MidServer Service Account, Unless MidServer Service Account is not part of the your domain accounts this will not work, The only way is to run the midServer using the domain account.
