Home

Deploy a Shortcut for RDS using Company Portal

%3CLINGO-SUB%20id%3D%22lingo-sub-268436%22%20slang%3D%22en-US%22%3EDeploy%20a%20Shortcut%20for%20RDS%20using%20Company%20Portal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-268436%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EIs%20it%20possible%20to%20deploy%20a%20shortcut%20to%20a%20remote%20desktop%20connection%20using%20Company%20portal%20to%20machines%20enrolled%20in%20MDM%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-268436%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EIntune%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMobile%20Device%20Management%20(MDM)%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-321644%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Deploy%20a%20Shortcut%20for%20RDS%20using%20Company%20Portal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-321644%22%20slang%3D%22en-US%22%3E%3CP%3EOk%20-%20I%20have%20now%20created%20the%20full%20script%20withd%20RDP%20info%20and%20the%20Output%20file.%3C%2FP%3E%3CP%3EHow%20about%20deployment%3F%20Just%20as%20a%20Powershell%20script%20as%20a%20device%20configuration%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-321562%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Deploy%20a%20Shortcut%20for%20RDS%20using%20Company%20Portal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-321562%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eyou%20should%20modify%20my%20script%20line%20as%20follows%20to%20create%20a%20Desktop%20shortcut%3A%3C%2FP%3E%0A%3CPRE%3E%24ShortCut%20%3D%20%24Shell.CreateShortcut(%22C%3A%5CProgramData%5CMicrosoft%5CWindows%5CStart%20Menu%5CPrograms%5CStartUp%5CBGInfo.lnk%22)%3C%2FPRE%3E%0A%3CP%3EChange%20it%20to%20the%20user%20location%20with%20the%20environment%20variable%20%24env%3Auserprofile%5Cdesktop%3C%2FP%3E%0A%3CP%3Eif%20you%20run%20your%20script%20in%20%3CSTRONG%3Euser%20context%3C%2FSTRONG%3E%20then%20this%20will%20function%20and%20create%20a%20shortcut%20on%20the%20user%20desktop.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20your%20.rdp%20file%20you%20can%20make%20it%20even%20easier%2C%20just%20create%20a%20demo%20.rdp%20file%2C%20save%20it%20somewhere%2C%20open%20it%20with%20notepad%20and%20you%20find%20something%20like%20this%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Escreen%20mode%20id%3Ai%3A1%3CBR%20%2F%3Euse%20multimon%3Ai%3A0%3CBR%20%2F%3Edesktopwidth%3Ai%3A1920%3C%2FP%3E%0A%3CP%3E...%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%20this%20would%20also%20be%20very%20simple%20to%20script%20as%20well%20and%20to%20deploy%20in%20the%20end.%20Just%20write%20the%20notepad%20content%20as%20shown%20above%20in%20a%20text%20file%20via%20a%20PowerShell%20script.%20Something%20like%20this%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%24rdpFile%20%3D%20%40%22%0Ascreen%20mode%20id%3Ai%3A1%0Ause%20multimon%3Ai%3A0%0Adesktopwidth%3Ai%3A1920%0A...%0A%22%40%0A%0A%24rdpFile%20%7C%20Out-File%20%24env%3Auserprofile%5CDesktop%5CMyRdpFile.rdp%3C%2FPRE%3E%0A%3CP%3EHope%20this%20gives%20an%20idea%20how%20to%20deal%20with%20your%20requirement.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ebest%2C%3CBR%20%2F%3EOliver%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-321377%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Deploy%20a%20Shortcut%20for%20RDS%20using%20Company%20Portal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-321377%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EGot%20a%20script%20working%20on%20my%20own%20machine%20%3A)%3C%2Fimg%3E%20So%20Tumbling%20a%20bit%20deploying%20it.%3C%2FP%3E%3CP%3EIm%20still%20just%20looking%20for%20a%20way%20to%20deploy%20a%20configured%20RDP%20file%20to%20the%20desktop.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BNow%2C%20a%20weblink%20is%20added%20to%20the%20start%20folder%2C%20so%20users%20have%20to%20enter%20the%20link%2C%20and%20download%20the%20RDP%20file.%3C%2FP%3E%3CP%3EBut%20I%20really%20would%20like%20to%20deploy%20the%20file%20to%20the%20desktop......%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-321290%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Deploy%20a%20Shortcut%20for%20RDS%20using%20Company%20Portal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-321290%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Micheal%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eyou%20can%20easily%20create%20a%20shortcut%20with%20a%20PowerShell%26nbsp%3Bscript.%20This%20can%20be%20deployed%20as%20a%20script%20native%20with%20Intune%20or%20wrapped%20in%20a%20.intunewin%20package%20and%20deployed%20as%20app%20containing%20just%20the%20simple%20PowerShell%20script.%20I%20did%20an%20example%20while%20deploying%20BGInfo%2C%20something%20like%20this%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%24Shell%20%3D%20New-Object%20-ComObject%20(%22WScript.Shell%22)%0A%24ShortCut%20%3D%20%24Shell.CreateShortcut(%22C%3A%5CProgramData%5CMicrosoft%5CWindows%5CStart%20Menu%5CPrograms%5CStartUp%5CBGInfo.lnk%22)%0A%24ShortCut.TargetPath%3D%22%60%22C%3A%5CProgram%20Files%5CBGInfo%5CBginfo64.exe%60%22%22%0A%24ShortCut.Arguments%3D%22%60%22C%3A%5CProgram%20Files%5CBGInfo%5Ccustom.bgi%60%22%20%2Ftimer%3A0%20%2Fsilent%20%2Fnolicprompt%22%0A%24ShortCut.IconLocation%20%3D%20%22Bginfo64.exe%2C%200%22%3B%0A%24ShortCut.Save()%3C%2FPRE%3E%0A%3CP%3Ecompare%20my%20blog%20post%20install.ps1%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Foliverkieselbach.com%2F2018%2F12%2F15%2Fdeploying-win32-app-bginfo-with-intune%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Foliverkieselbach.com%2F2018%2F12%2F15%2Fdeploying-win32-app-bginfo-with-intune%2F%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20a%20deeper%20understanding%20of%20.intunewin%20and%20app%20deployment%20with%20Intune%20look%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Foliverkieselbach.com%2F2018%2F10%2F02%2Fpart-3-deep-dive-microsoft-intune-management-extension-win32-apps%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Foliverkieselbach.com%2F2018%2F10%2F02%2Fpart-3-deep-dive-microsoft-intune-management-extension-win32-apps%2F%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ebest%2C%3CBR%20%2F%3EOliver%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-321039%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Deploy%20a%20Shortcut%20for%20RDS%20using%20Company%20Portal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-321039%22%20slang%3D%22en-US%22%3EHi%20Oliver%3CBR%20%2F%3EJust%20another%20question.....%3CBR%20%2F%3EThis%20is%20working%20just%20fine%20-%20but%20is%20it%20possible%20to%20to%20deploythe%20weblink%20directly%20to%20the%20desktop%3F%3CBR%20%2F%3EEither%20in%20the%20same%20workflow%20or%20another%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-270580%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Deploy%20a%20Shortcut%20for%20RDS%20using%20Company%20Portal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-270580%22%20slang%3D%22en-US%22%3E%3CP%3ETry%20packaging%20your%20script%20with%20the%20new%20Win32%20deployment%20feature%20and%20target%20it%20as%20user%20assignment%20for%20available%2C%20you%20should%20see%20it%20and%20the%20script%20should%20work%20with%20the%20Intune%20Mangement%20Extension.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20run%20through%20can%20be%20found%20here%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fwww.scconfigmgr.com%2F2018%2F09%2F24%2Fdeploy-win32-applications-with-microsoft-intune%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fwww.scconfigmgr.com%2F2018%2F09%2F24%2Fdeploy-win32-applications-with-microsoft-intune%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20a%20technical%20deep%20dive%20can%20be%20seen%20here%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Foliverkieselbach.com%2F2018%2F10%2F02%2Fpart-3-deep-dive-microsoft-intune-management-extension-win32-apps%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%3Ehttps%3A%2F%2Foliverkieselbach.com%2F2018%2F10%2F02%2Fpart-3-deep-dive-microsoft-intune-management-extension-win32-apps%2F%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebest%2C%3C%2FP%3E%3CP%3EOliver%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-270172%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Deploy%20a%20Shortcut%20for%20RDS%20using%20Company%20Portal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-270172%22%20slang%3D%22en-US%22%3E%3CP%3EGot%20it%20using%20the%20same%20assignment%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhile%20we%20are%20at%20it%20-%20du%20you%20now%20if%20its%20possible%20to%20add%20a%20mapped%20drive%20using%20Powershell%3F%20in%20the%20Portal%3F%3C%2FP%3E%3CP%3ETried%20using%26nbsp%3B%3C%2FP%3E%3CP%3ENew-PSDrive%20-Name%20%22P%22%20-PSProvider%20%22FileSystem%22%20-Root%20%22%5C%5CShare%5CFolder%22%20-Persist%20-Credential%26nbsp%3B%3C%2FP%3E%3CP%3E-%20But%20again%20-%20not%20showing...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-270157%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Deploy%20a%20Shortcut%20for%20RDS%20using%20Company%20Portal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-270157%22%20slang%3D%22en-US%22%3E%3CP%3EOkay%20not%20the%20best%20experience%20but%20maybe%20something%20you%20like%20to%20have%20anyway.%20I%20targeted%20it%20to%20%22All%20Users%22%20with%20assignment%20of%20%22Available%20with%20or%20without%20enrollment%22%20and%20got%20the%20link%20as%20featured%20app.%20but%20the%20link%20still%20shows%20install%2C%20after%20clicking%20install%20it%20installs%20the%20web%20link%20to%20the%20start%20menu%20where%20you%20can%20click%20and%20open%20the%20website...%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F56067i6E2ADEE1BF83A979%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22SNAG-0023.png%22%20title%3D%22SNAG-0023.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%20try%20the%20different%20assignment%20and%20make%20sure%20you%20target%20it%20to%20users.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ebest%2C%3C%2FP%3E%0A%3CP%3EOliver%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-270092%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Deploy%20a%20Shortcut%20for%20RDS%20using%20Company%20Portal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-270092%22%20slang%3D%22en-US%22%3E%3CP%3EHmm...%20Created%20the%20web%20link%2C%20but%20it%20does%20not%20show%20in%20Company%20Portal%3F%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-269973%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Deploy%20a%20Shortcut%20for%20RDS%20using%20Company%20Portal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-269973%22%20slang%3D%22en-US%22%3EHi%20Oliver.%3CBR%20%2F%3ESounds%20Cool.%20I%20will%20look%20into%20the%20Weblink%20approach.%3CBR%20%2F%3EThanks%3A)%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-269781%22%20slang%3D%22en-US%22%3ERE%3A%20Deploy%20a%20Shortcut%20for%20RDS%20using%20Company%20Portal%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-269781%22%20slang%3D%22en-US%22%3EHi%20Michael%2C%20You%20could%20point%20them%20to%20a%20RDS%20website%20by%20using%20the%20app%20type%0A%22Web%20link%22.%20This%20would%20give%20you%20a%20Company%20Portal%20link%20to%20your%20RDS%0Awebsite.%20This%20can%20even%20be%20shown%20as%20features%20app%20on%20the%20main%20page.%20But%20a%0Away%20to%20publish%20a%20real%20shortcut%20which%20then%20opens%20the%20RDP%20connection%0Adirectly%20is%20not%20available.%20best%2C%20Oliver%3C%2FLINGO-BODY%3E
Michael Jensen
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

Highlighted
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?

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?

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies