Using remediations to deploy a quick assist shortcut on the desktop

What’s up, everyone! 

There are a couple of ways to deploy a shortcut to the desktop of the user. In this post I will zoom in on using Intune remediations to check if the Quick Assist shortcut is available on the users desktop. And if it’s not, it will create a shortcut. There are a couple of small tricks in this post, so I hope you’ll like it!

Requirements

There are quite a bit of requirements to use rememdiations. So I’ve decided to link (here) to the Microsoft site instead of listing each requirement.

Make sure to check if you have the correct licenses. Microsoft will make sure that you verify before you can use remediations. Assuming that your licenses are good, go to the Microsoft Intune admin center, Tenant administration and toggle the I confirm that my tenant owns one of these licenses switch to On.

How do remediations work?

Remediations are based on two PowerShell scripts:

  • Detection script: Use this script to determine if the goal is met or not. Make sure to use exit 0 if the goal is met or use exit 1 if the goal is not met and the remediation script needs to be executed on the device.
  • Remediation script: Use this script to fix the issue at hand.

As an admin you can assign this remediation to All users, All devices or a custom group. You can decide to run the script only once of create an hourly or daily schedule.

Using remediations to deploy Quick Assist on the desktop

Let’s do a demo on how to deploy a shortcut for Quick Assist on the desktop of a user. I will need to perform the following steps:

  1. Get a working shortcut of Quick Assist.
  2. Create a detection script.
  3. Create a remediation script.
  4. Create the remedation in Microsoft Intune.
  5. Watch the magic happen!

Step 1: Get a working shortcut of Quick Assist.

Quick Assist is a modern app and creating a shortcut from the executable directly will give you all kinds of trouble when trying to start Quick Assist. Instead use the following command in the shortcut:

explorer.exe shell:appsFolder\MicrosoftCorporationII.QuickAssist_8wekyb3d8bbwe!App

Also make sure to use a tool of your choice to extract / generate the desired icon file and save that next to the shortcut. Open the shortcut and change the icon file to the newly saved icon. If you don’t do this step, you will end up with a blank icon.

I just copied all the files in C:\Temp since that is where the files will be extracted on the target devices and that also the place where I changed the icon in the shortcut.

Step 2: Create a detection script.

In this script I determined the location where the Quick Assist shortcut should be located. The script will return one of the following:

  • Exit code 0: if the shortcut is found and the remedation script should not run. 
  • Exit code 1: if the shortcut is not found and the remediation script should run.

Here is the PowerShell code I used:

# Detection script: check if the Quick Assist shortcut exists on the users desktop
$desktopPath = [Environment]::GetFolderPath("Desktop")
$fileName = "Quick Assist.lnk"
$check = $desktopPath + "\" + $fileName
$result = Test-Path $check
if ($result -eq "True") {
    # The file exist, exit with code 0 
    exit 0
}
else {
    # The file does not exist, exit with code 1 to allow the remediation script to copy the file
    exit 1
}

Step 3: Create a remediation script.

This script aims to create a shortcut for Quick Assist on the desktop. To do so I simply converted the Quick Assist.zip file to Base64 code. 

Just decode the Base64 to a variable and save the content to a file. 

Next up is to extract the shortcut from the zip archive and copy it to the desktop of the user.

Here is the script that I used:

# Remediation script: copy the Quick Assist shortcut on the desktop of the user
# Detect temp folder
$tempFolder = "C:\Temp"
$checkTemp = Test-Path -Path $tempFolder
if ($checkTemp -match "False") {
    New-Item -ItemType Directory -Path "C:\Temp" | out-null
} 
else {
    # Temp folder exist, moving on to next step
}
# Decode base64 code to file
$base64string = "UEsDBBQAAAAIAEphzlgFtKjyggMAAMAJAAAQAAAAUXVpY2sgQXNzaXN0Lmxua+1VXUxbZRh+OiEWMaNk/PhDBzq7IbpSfi01S7oVCjOYdiuRXpxlg/ZAz9rS2lMGMyYz8cJsg4tlWbYLXZqxgYhe7GJ6sZ8sXnkzQnZhkAtjFmOCi2lQE42S6PN9Pe3cCBrJbmb8Tt7v53nf7/nen3O+0wvAVLEJot2UPby/u82o42S21zfnnloyrdzZ+1bDjSVTYjkq1+Y/9ktDE+5vd1GBWv83voW6712a5cKiGS85HB88jUaPS8Ha9gaa5DgfDHVY0K+NhBNjOtwoQRGyN2b6Xm4QGjst/GZh9+Bx2bQV/dAwgjASGINOrApDaIZwcC74XUkd1PFkLJFSU3Z1XAVeM7iFbj54XHIfy9zjfrvAfWr6LFSMI4kYuVOcp2CXCGlQQ/Eao8kYdxo7uyjllMcon5fN1lgEyAQY8Sn3e1RNVjuUB+JQ1j3bCg9c1PuJJTDMfgBxFsvL/THq9TVcu8mTlHgX+whtYnxc3JfDvbSL0VqcouB17g1Jbp0yhDTPEz4kZT/AtcbZCPbysWMfRqV9lKfofD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5pY29QSwUGAAAAAAIAAgB7AAAADBEAAAAA"
$FileName = "C:\Temp\Quick Assist.zip"
$bytes = [Convert]::FromBase64String($base64string)
[IO.File]::WriteAllBytes($FileName, $bytes)
# Extract .lnk from .zip file
Expand-Archive -LiteralPath "C:\Temp\Quick Assist.zip" -DestinationPath "C:\Temp\"
# Copy the .lnk file to the users desktop
$desktopPath = [Environment]::GetFolderPath("Desktop")
Copy-Item "C:\Temp\Quick Assist.lnk" -Destination $desktopPath

Step 4: Create the remediation in Microsoft Intune.

From the Microsoft Intune admin center, go to Devices, Scripts and remediations and select the + Create button.

Provide a name and optionally a description.

Use the folder icon to upload the previously prepared detection and remediation script. 

Make sure to run the script in the users context since we need to deploy the shortcut on their deskop.

Add scope tags if you like and continue to the Assignments tab. 

From the assignments tab, assign the remediation to all users, all devices or a custom group. In this demo I chose all devices and used a filter for my Cloud PCs.

Notice that there’s a schedule option. Click and and decide if you want to run this remediation only once, hourly or daily. 

Take a moment to admire your awesome work and save the remedation.

You will see the remediation in the overview once it’s created. 

There is more information available if you click on the remediation:

All that is left to do is to wait until the remediation is executed on the affected systems and the Quick Assist icon will pop up on the desktop.

Resources

I used the following resources for this post:

Remediations | Microsoft Learn

Author

  • Dominiek Verham

    Dominiek Verham is one of the founders of the Cloud Experts Community. Would you like to join in the fun? Make sure to contact him via the mail button below or find out more about him on his personal website.

    View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *