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
90 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 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
This article summaries thoughts and ideas from two years of sustained use. It provides good reasoning to make the jump to Windows 10.
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

756 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