Intune: Deploy a IntelliJ and Rider plugin via a Win32 Application.

If you are ever in need of deploying a plugin to “IntelliJ IDEA Ultimate”, “IntelliJ IDEA Community Edition” or “JetBrains Rider” using Intune, I have done the groundwork for you already. PSADT is not a good option here as the Plugins has to be installed in the users context (and PSADT requires elevation).

The solution I came up with consist of a Win32 application that will try to automatically install the Plugin for any version of IntelliJ and Rider that is found on the targeted computers, as they are using the same Plugin type. The Plugin application can be deployed to all devices, but will only install on devices that has IntelliJ and/or Rider installed. Another requirement for the installation to function correctly is that IntelliJ and/or Rider has to have been launched atleast once on the computer (The version specific plugin folder in %AppData% has to exist). If the deployment is setup as descibed in this guide, the plugin will also be installed if an additional required product gets installed at a later point in time.

In this example we will deploy a plugin called “IntelliJPlugin-1.0.0.jar”. Note! It is important that you have the version number as part of the name of the .Jar file. If not, you will have to find a way to read the version number from within the .jar container.

The solution consists of 4 PowerShell scripts + the Plugin .jar file ofc. The PowerShell scrips are the following:

  • Install.ps1
  • Uninstall.ps1
  • Detection.ps1
  • Requirement.ps1

Lets start with the Install.ps1 script which will find out what IntelliJ product(s) are installed and installe the Plugin into the plugin directoy/directories (Note that a transcript will be placed in the users %TEMP% folder for troubleshooting purposes):

The Uninstall.ps1 script will make sure that the plugin is removed from the device (Note that a transcript will be placed in the users %TEMP% folder for troubleshooting purposes).

Then we have the Detection.ps1 script used for detecting if the Plugin is installed or not.

Last but not least, we have our Requirement.ps1 script. The script checks for the existance of IntelliJ & Rider installed from either the native installers from JetBrains website or through “JetBrains Toolbox” installer and checks if the application has been launched atleast once:

Now to wrap the Installation files into a .Intunewin file using https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool. The Installation files are:

  • Install.ps1
  • Uninstall.ps1
  • IntelliJPlugin-1.0.0.jar

Create a Win32 application and Import the .Intunewin file.
Set the Install and Uninstall command as follows:

Setup the requirement rule as follows, and make sure to select your “Requirement.ps1” script as below:

Now for the Detection rule, make sure to select your newly created “Detection.ps1” script:

Now you just need to deploy it as required to the devices you wish to deploy it to. To make the installation more visual for users, I would recommend to also make it available for users. This will make the application visible in the Company Portal and users can see if they do not have the requirements in place.

After some time, the report/overview should be showing you the result of your deployment.

Note that the “Not Applicable”, shows the devices that do not have the requirements fulfilled (i.e IntelliJ and/or Rider Installed + having the app started up the first time).

One thought on “Intune: Deploy a IntelliJ and Rider plugin via a Win32 Application.

Leave a comment