copying file

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 15 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
yogeshgole
Posts: 16
Last visit: Mon Apr 21, 2008 8:03 pm

copying file

Post by yogeshgole »

i tried to copy file to remote machine on shared drive using filesystem object, there is problem while copying file to destination with different user credentials....

We have administrative rights on source machine..but how to pass password and username to remote machine which is not under our administrative power.
User avatar
yogeshgole
Posts: 16
Last visit: Mon Apr 21, 2008 8:03 pm

copying file

Post by yogeshgole »

i tried to copy file to remote machine on shared drive using filesystem object, there is problem while copying file to destination with different user credentials....

We have administrative rights on source machine..but how to pass password and username to remote machine which is not under our administrative power.
User avatar
othman
Posts: 145
Last visit: Tue Nov 02, 2021 1:40 am

copying file

Post by othman »

can you post your script
User avatar
donj
Posts: 416
Last visit: Thu May 29, 2008 5:08 am

copying file

Post by donj »

WMI does let you pass credentials, but I don't know if there's a method for copying a file. It'd be pretty inefficient. There's not another means I'm aware of - the file system wasn't designed specifically for this. You could always manually map a network drive ahead of time, which does accept manual credentials, and code your script to use that mapped drive.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

copying file

Post by jvierra »

WMI disallows "delegated" operations by default. This is a security measure that can only be remedied at the domain level.

copy machineAfiles machinebfiles

is the best it gets without using third party tools designed to enhance file movement in a network.

When PowerShell 2.0 becomes available we might get a better remoting mechanism because it will have a better remoting security infrastructure. The current CTP looks promising.
jvierra2008-04-13 08:09:57
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

copying file

Post by jvierra »

It is unrelesed software and can't be of much help as it is not intended for production use.

When 2.0 becomes available it would be able to use remote machine memory and copy with good security along with many other features that have been promised and wished for.

This topic is 15 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked