-1

I'm new to sccm, psexec, and vb scripting. I need help copying a Internet Explorer shortcut from a server to multiple computers.

Lets say my link is named Shortcut.lnk and is located on \troyserver\shortcut.lnk and I need to push it to troypc1, troypc2, troypc3. How could I do this?

Can someone help me out with this? i've tried using xcopy and psexec and I cannot come up with something simple that works.

I need everything spelled out in detail because im a rookie.

1 Answer 1

0

Seems this question was asked without searching. Duplicate of this question How to create a shortcut using Powershell where the answer is listed out with example code.

You can use Powershell to create a shortcut on a remote computer. (edit) Also note you can use Powershell's foreach to loop through a list of computers. There are numerous examples of this available on StackOverFlow.

Example:
PS C:\> $shell = New-Object -comObject WScript.Shell
PS C:\> $shell

SpecialFolders                          CurrentDirectory
--------------                          ----------------
System.__ComObject                      C:\


PS C:\> $shortcut = $shell.CreateShortcut('\\SERVER\c$\mine.lnk')
PS C:\> $shortcut.TargetPath = c:\Windows\Notepad.exe
PS C:\> $shortcut.TargetPath = "c:\Windows\Notepad.exe"
PS C:\> $shortcut.save()
PS C:\> ls '\\itdrenmvp787\c$\mine.lnk'


Directory: \\itdrenmvp787\c$\

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---        12/23/2014   3:18 PM        673 mine.lnk

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.