?
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
Medium Priority
?
106 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
[X]
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
  • 3
  • 3
6 Comments
 
LVL 25

Accepted Solution

by:
NVIT earned 2000 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 25

Assisted Solution

by:NVIT
NVIT earned 2000 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
WatchGuard's M Series Appliances - Miecom Approved

WatchGuard's newest M series appliances were put to the test by Miercom.  We had great results and outperformed all of our competitors in both stateless and stateful traffic throghput scenarios! Ready to see how your UTM appliance stacked up? Download the Miercom Report!

 
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 25

Assisted Solution

by:NVIT
NVIT earned 2000 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

We take a look at some of the most common obstacles that IT teams run into as they work relentlessly to keep all the alarms and sirens from going off at once.
Introducing Priority Question, our latest feature.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Suggested Courses

762 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