Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

I'd like to use pstools to copy a .lnk file from a network share to a local folder on each workstation's desktop.

Posted on 2016-08-23
6
84 Views
Last Modified: 2016-08-23
Having some difficulty with the syntax/understanding what exactly i'm trying to accomplish.

psexec -s \\hostname-pc COPY \\server\share\file.lnk ????C:/?  I'm not sure how to "phrase" the destination.  

Since the initial command of "psexec -s \\hostname-pc . . ." runs the command from THAT hostname-pc right?  So do I have to use a "shared" folder on the workstation to copy this file to?  Or since i'm running the command from that workstation can I use any filepath?  

Synopsis:
I have a .lnk(shortcut) file that runs system restore and creates a manual restore point.  I'd like to push this file to my desktop users local machines so the shortcut could be run at anytime.  Well over 100 workstations to copy this file to so using psexec or something similar would be awesome.
0
Comment
Question by:Daniel Checksum
  • 3
  • 3
6 Comments
 
LVL 24

Accepted Solution

by:
NVIT earned 500 total points
ID: 41767239
To copy to all stations in the domain...
psexec \\* -s -c cmd /c COPY \\server\share\file.lnk c:\

Open in new window


To copy to certain stations in the domain...

- Make a .txt file containing the destination host names, one name per line. E.g. Names.txt
Host1
Host2

Open in new window


psexec @names.txt -s -c cmd /c COPY \\server\share\file.lnk c:\

Open in new window

0
 
LVL 1

Author Comment

by:Daniel Checksum
ID: 41767247
So I would be able to write directly to root C:\?   Or would I have to choose like C:\%userprofile%\Documents ?  

That is where my confusion lies, on the destination end of the copy command.  I appreciate your clear and concise suggestion though.
0
 
LVL 24

Assisted Solution

by:NVIT
NVIT earned 500 total points
ID: 41767249
That complicates things. You'll need each user name to feed into it.

I think you can use the public folder since all/most use the same path.

Or use a gpo/gpp instead of psexec
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 1

Author Comment

by:Daniel Checksum
ID: 41767252
If domain admins have local access to each workstation(which should be already configured) then I should be able to use our domain Administrator account on each workstation right?  My ex-boss also recommended using the Public folders.
0
 
LVL 24

Assisted Solution

by:NVIT
NVIT earned 500 total points
ID: 41767260
As long as its the same on all stations, it should work.
E.g. C:\users\adminname\Documents
1
 
LVL 1

Author Closing Comment

by:Daniel Checksum
ID: 41767263
Thanks for all your help, NVIT.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the market for a new backup solution for Windows Server 2016? Follow these guidelines to get the most bang for your buck.
Are client relationship the only driver of a successful MSP? While important, client relationships are only one component. Learn how else MSPs can broaden their horizon and differentiate themselves.
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question