Jump to content

Sending an edited rdp icon to all users computers


Nickolas

Recommended Posts

  • Administrators

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

Link to comment
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.

Link to comment
Share on other sites

  • Administrators

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...