Jump to content
Pulseway 9.14 🔥

Featured Replies

Posted

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. 

  • Author

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.

  • 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

Create an account or sign in to comment