SOLVED

Deploy a Shortcut for RDS using Company Portal

Brass Contributor

Hi,

Is it possible to deploy a shortcut to a remote desktop connection using Company portal to machines enrolled in MDM? 

 

11 Replies
Hi Michael, You could point them to a RDS website by using the app type "Web link". This would give you a Company Portal link to your RDS website. This can even be shown as features app on the main page. But a way to publish a real shortcut which then opens the RDP connection directly is not available. best, Oliver
Hi Oliver.
Sounds Cool. I will look into the Weblink approach.
Thanks:)

Hmm... Created the web link, but it does not show in Company Portal??

Okay not the best experience but maybe something you like to have anyway. I targeted it to "All Users" with assignment of "Available with or without enrollment" and got the link as featured app. but the link still shows install, after clicking install it installs the web link to the start menu where you can click and open the website...

 

SNAG-0023.png

 

 

So try the different assignment and make sure you target it to users.

 

best,

Oliver

Got it using the same assignment 🙂

 

While we are at it - du you now if its possible to add a mapped drive using Powershell? in the Portal?

Tried using 

New-PSDrive -Name "P" -PSProvider "FileSystem" -Root "\\Share\Folder" -Persist -Credential 

- But again - not showing...

 

Try packaging your script with the new Win32 deployment feature and target it as user assignment for available, you should see it and the script should work with the Intune Mangement Extension.

 

A run through can be found here:

http://www.scconfigmgr.com/2018/09/24/deploy-win32-applications-with-microsoft-intune/

 

and a technical deep dive can be seen here:

https://oliverkieselbach.com/2018/10/02/part-3-deep-dive-microsoft-intune-management-extension-win32...

 

best,

Oliver

Hi Oliver
Just another question.....
This is working just fine - but is it possible to to deploythe weblink directly to the desktop?
Either in the same workflow or another?
best response confirmed by ThomasStensitzki-MVP (MVP)
Solution

Hi Micheal,

 

you can easily create a shortcut with a PowerShell script. This can be deployed as a script native with Intune or wrapped in a .intunewin package and deployed as app containing just the simple PowerShell script. I did an example while deploying BGInfo, something like this:

 

$Shell = New-Object -ComObject ("WScript.Shell")
$ShortCut = $Shell.CreateShortcut("C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\BGInfo.lnk")
$ShortCut.TargetPath="`"C:\Program Files\BGInfo\Bginfo64.exe`""
$ShortCut.Arguments="`"C:\Program Files\BGInfo\custom.bgi`" /timer:0 /silent /nolicprompt"
$ShortCut.IconLocation = "Bginfo64.exe, 0";
$ShortCut.Save()

compare my blog post install.ps1 here: https://oliverkieselbach.com/2018/12/15/deploying-win32-app-bginfo-with-intune/

 

For a deeper understanding of .intunewin and app deployment with Intune look here: https://oliverkieselbach.com/2018/10/02/part-3-deep-dive-microsoft-intune-management-extension-win32...

 

best,
Oliver

Hi,

Got a script working on my own machine 🙂 So Tumbling a bit deploying it.

Im still just looking for a way to deploy a configured RDP file to the desktop. 

 Now, a weblink is added to the start folder, so users have to enter the link, and download the RDP file.

But I really would like to deploy the file to the desktop......

Hi,

 

you should modify my script line as follows to create a Desktop shortcut:

$ShortCut = $Shell.CreateShortcut("C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\BGInfo.lnk")

Change it to the user location with the environment variable $env:userprofile\desktop

if you run your script in user context then this will function and create a shortcut on the user desktop.

 

For your .rdp file you can make it even easier, just create a demo .rdp file, save it somewhere, open it with notepad and you find something like this:

 

screen mode id:i:1
use multimon:i:0
desktopwidth:i:1920

...

 

So this would also be very simple to script as well and to deploy in the end. Just write the notepad content as shown above in a text file via a PowerShell script. Something like this:

 

$rdpFile = @"
screen mode id:i:1
use multimon:i:0
desktopwidth:i:1920
...
"@

$rdpFile | Out-File $env:userprofile\Desktop\MyRdpFile.rdp

Hope this gives an idea how to deal with your requirement.

 

best,
Oliver

Ok - I have now created the full script withd RDP info and the Output file.

How about deployment? Just as a Powershell script as a device configuration?

1 best response

Accepted Solutions
best response confirmed by ThomasStensitzki-MVP (MVP)
Solution

Hi Micheal,

 

you can easily create a shortcut with a PowerShell script. This can be deployed as a script native with Intune or wrapped in a .intunewin package and deployed as app containing just the simple PowerShell script. I did an example while deploying BGInfo, something like this:

 

$Shell = New-Object -ComObject ("WScript.Shell")
$ShortCut = $Shell.CreateShortcut("C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\BGInfo.lnk")
$ShortCut.TargetPath="`"C:\Program Files\BGInfo\Bginfo64.exe`""
$ShortCut.Arguments="`"C:\Program Files\BGInfo\custom.bgi`" /timer:0 /silent /nolicprompt"
$ShortCut.IconLocation = "Bginfo64.exe, 0";
$ShortCut.Save()

compare my blog post install.ps1 here: https://oliverkieselbach.com/2018/12/15/deploying-win32-app-bginfo-with-intune/

 

For a deeper understanding of .intunewin and app deployment with Intune look here: https://oliverkieselbach.com/2018/10/02/part-3-deep-dive-microsoft-intune-management-extension-win32...

 

best,
Oliver

View solution in original post