Jump to content
Nickolas

Sending an edited rdp icon to all users computers

Recommended Posts

Hi,

I'm trying to give all my users a new rdp icon on their desktop to log into our remote environment.  How would I do so using powershell?

I know .bat would work as well but Im not sure how I would go about it using pulseway. 

Share this post


Link to post
Share on other sites

Hi @Nickolas,

Do you want the RDP file to also contain a username / password? It will have to be in clear-text if so? All you need to do is write the rdp file contents using powershell to a disk using Add-Content. Open the RDP file using Notepad to see it's contents.

-Paul

Share this post


Link to post
Share on other sites

Hey Paul,

Thanks for the speedy reply.

I wouldn't need the RDP file to have any login info, just some settings that are pre-configured. Everyone would receive the same icon and they would manually type in their own credentials. Ideally I would like to push it to everyone's desktop almost like a file transfer.  If I had a network that was Active Directory based it would be pretty simple to write the script for it, but im a little lost about how I would go about it through Pulseway.

Share this post


Link to post
Share on other sites

Best course of action would be to put the file in a dropbox or google drive folder, get the direct link to the file and script a simple download / copy to all user profiles, so to download a file use:

$url = "http://mirror.internode.on.net/pub/test/10meg.test"
$output = "c:\10meg.test"

Invoke-WebRequest -Uri $url -OutFile $output

Then to copy it to the user's desktop use:

move-item "c:\10meg.test" "c:\users\public\desktop"

Finally you'll want to only do this once for all desktops so simply check if the file already exists before running all the logic by placing this on top of the script:

if (Test-Path 'c:\users\public\desktop\10meg.test') {
  exit 0
}

-Paul

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...