Microsoft

PowerShell Script to install the new Quick Assist silently.

Pop-up users will receive if they open the old version.

Like most people, I was shocked to find out that the built-in version of Quick Assist would be going away and that a new version needed to be downloaded from the Microsoft Store. At first, I thought it would be easy to simply have the user select “Open Microsoft Store” and go on to download it.

That was not the case…

As soon as I tried to download the new version from the Microsoft Store, I noticed a UAC prompt during installation. Now, this might not be a problem for everyone; however, in my environment, none of my users have administrative rights.

UAC Prompt when attempting to install the Windows Store version.

Getting the offline installation file

Since the new version is only available in the Microsoft Store, one would have to download the offline installation file. The file is an “AppxBundle”. You can download the file by navigating to here and search for “https://www.microsoft.com/store/productId/9P7BP5VNWKX5”

If you would like to download the premade .zip that includes the script and offline installer, you can download it by clicking here

If your looking to do this via intune have a look at my latest blog post

The script

The script can be downloaded here. Make sure to place the script in the same directory as the offline installation file.

Let’s dive into the code

Read more

Logging

The default log is saved in the root of the C:\ drive. This can be modified as needed by editing the lines below.

#Log output results
function LogOutput($Message) {
    $LogFile = "C:\Quick-Assist.log"
    "$(get-date -Format 'MM/dd/yyyy HH:mm') $($Message)" | Out-file -FilePath $LogFile -Append -Force
}

-Install

This section handles the installation and clean up of the old version. Everything is also logged to the log file.

#Start of Script
If ($Install){
	Try {
		LogOutput "***This script is used to install the new Quick Assist app that is from the Microsoft Store. It will also remove the old version***"
		$InstallAppX = Get-AppxPackage -allusers MicrosoftCorporationII.QuickAssist
		If ($InstallAppX.status -eq 'OK'){
			LogOutput "[Info] Windows Store version of Quick Assist is already installed" 
			#lets uninstall the old version.
			LogOutput "[Info] lets uninstall the old version" 
			Remove-WindowsCapability -Online -Name 'App.Support.QuickAssist~~~~0.0.1.0' -ErrorAction 'SilentlyContinue'
			LogOutput "[Info] Old version of Quick Assist has been uninstalled" 
		}
		If ($InstallAppX.status -ne 'OK'){
			LogOutput "[Info] Installing the Windows Store version of Quick Assist..."
			Add-AppxProvisionedPackage -online -SkipLicense -PackagePath '.\MicrosoftCorporationII.QuickAssist.AppxBundle'
			LogOutput "[Info] Attempting to remove the old version of Quick Assist..."
			Remove-WindowsCapability -Online -Name 'App.Support.QuickAssist~~~~0.0.1.0' -ErrorAction 'SilentlyContinue'
		}
		LogOutput "[Success] The Windows store version of Quick assist has successfully installed and the old version has been removed." 
	} catch [exception] {
		LogOutput "[Error] An error occurred installing Quick Assist: $($_.Exception.Message)" 
	}
}

-uninstall

This section handles uninstalling the app, in the event you want to remove both the Windows Store version and the legacy version of Quick Assist.

If ($Uninstall){
	Try {
		LogOutput "***This script is used to uninstall all versions of Microsoft Quick Assist***"
		$AppXStatus = Get-AppxPackage -allusers MicrosoftCorporationII.QuickAssist
		#Check to see if the Windows Store version of Quick Assist is installed. Also, lets force an uninstall of the old version just in case 
		If ($AppXStatus.status -ne 'OK'){
			Remove-WindowsCapability -Online -Name 'App.Support.QuickAssist~~~~0.0.1.0' -ErrorAction 'SilentlyContinue'
			LogOutput "[Info] Windows Store version of Quick Assist was not found." 
		}
		#Lets uninstall the Windows Store version of Quick Assist and the old version just in case.
		If ($AppXStatus.status -eq 'OK'){
			Get-AppxPackage -allusers MicrosoftCorporationII.QuickAssist | Remove-AppxPackage -allusers
			Remove-WindowsCapability -Online -Name 'App.Support.QuickAssist~~~~0.0.1.0' -ErrorAction 'SilentlyContinue'
		}
		LogOutput "[Info] The Windows store version of Quick Assist has successfully been uninstalled." 
	} catch [exception] {
		LogOutput "[Error] An error occurred uninstalling The Windows store version of Quick Assist: $($_.Exception.Message)" 
	}
}

Executing the script

Open PowerShell as admin and navigate to the directory where the script is (remember to make sure the offline installation file is in the same directory as the script!): To execute the script, type:

powershell -executionpolicy bypass -file Quick-Assist-Package.ps1 -install

If you want to uninstall Quick Assist, then run the following command:

powershell -executionpolicy bypass -file Quick-Assist-Package.ps1 -uninstall

Conclusion

After running the script, you should now see the Windows Store version of Quick Assist installed and the legacy version removed.

Standard

10 thoughts on “PowerShell Script to install the new Quick Assist silently.

  1. Pingback: Using Intune to deploy the new Microsoft Quick Assist | DroidKid

  2. natha says:

    i received the below in the log An error occurred installing Quick Assist: The parameter is incorrect.

    i have both the installer and ps script in the same folder

    • Milk says:

      yes – getting this too. changed the directory and everything. oh well. gave me some ideas how to make my own though

  3. Liam says:

    Great work with this. When i’ve tested, the shortcut no longer works (ctrl windows q) Have you found this? Was there a work around?

  4. anon says:

    Glitch in “Quick-Assist-Package.ps1”, command to remove:
    Get-AppxPackage -allusers MicrosoftCorporationII.QuickAssist | Remove-AppxPackage -allusers
    should be:
    “Get-AppxPackage -allusers MicrosoftCorporationII.QuickAssist | Remove-AppxPackage”
    otherwise it errors out…..

  5. corne says:

    I am getting a “parameter is incorrect” in the log file.
    The command which i do is (thru immediate scheduled task in WIndows)
    program: Powershell.exe
    attributes: -executionpolicy bypass -command “& C:\quick\quickassist\Quick-Assist-Package.ps1” -install
    THe ps1 and the other file are copied to c:\quick from a network share and they are present.
    Any Idea?

  6. corne says:

    the scheduled task is running as system user, i have other tasks which running fine and the script is running also fine when starting is on a client as an admin with -install. So the reason must be the scheduled task way of running it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s