Deployment of Zluri Windows Agent using MS Intune

Windows Agent Version: 3.2.5

Windows Versions tested on: Windows 11, Windows 10


  1. Login to your MS Intune

SETTING UP THE SCRIPTS

  1. Navigate to Devices and search for Scripts



  2. Click on Add

  3. Choose Windows or Later

  1. Add the basic Details like name and description
    Name: Zluri script
    Description: Zluri script for agent installation

  1. In the “Script settings.”

Add the script file, 

Run this script using the logged-on credentials: Yes

Enforce script signature check: No

Run a script in 64-bit PowerShell Host: Yes

Click on “Next


  1. Assign it to a group/all devices/all users based on how this is being deployed; click on Next.


  1. Click on add

                

The recommended way of implementation is first to assign the scripts and then assign the application.

Script:

Save the file with an extension: .ps1

Example: windowsScript.ps1


#expected version. zluri apps lesser than this version will get uninstalled.

$expectedVersion="3.2.5.0"

#Values to insert into client-config.json file

$configValues='{"org_token": "<orgToken>","interval": "3600000"}'

#########################################################################################

    # Path for zluri script logs

$logPathRoot=$env:programdata

If (-not (Test-Path "$logPathRoot\zluri")) {

        Log-Message "Creating zluri folder in $folderPath"

        New-Item -Path "$logPathRoot\zluri" -ItemType "directory"

    }

    # Logger function

Function Log-Message([String]$Message)

{

    Add-Content -Path "$logPathRoot\zluri\zluriscriptlog.txt" $Message

}

    # Specify the expected version in the same format

$logDate=Get-date

Log-Message "$logDate"

    # Get the installed zluri apps

$isZluriApp=Get-WmiObject -Class Win32_Product | where name -eq zluri

Log-Message "$isZluriApp"

    # For each zluri agent present in the system

    foreach($zluriApp in $isZluriApp){

        Log-Message "$zluriApp"

        $currentVersion=$zluriApp.version

            # Check if expected version is greater than the installed zluri version

        if($expectedVersion -gt $currentVersion){

            Log-Message "checking if $expectedVersion greater than $currentVersion"

            $zluriProcess=Get-Process -Name "zluri"

                # stopping all zluri process

            Log-Message "$zluriProcess"

            $nid = (Get-Process zluri).id

                Stop-Process -Id $nid

                Wait-Process -Id $nid -ErrorAction SilentlyContinue

                # Uninstalling zluri app

            $zluriApp.uninstall() | Out-Null

                # deleting zluri folder from %localappdata%\programs

            Remove-Item C:\Users\$env:username\AppData\Local\Programs\zluri -Recurse -Force -ErrorAction silentlycontinue

            Remove-Item C:\Users\$env:username\AppData\Roaming\zluri -Recurse -Force -ErrorAction silentlycontinue

                # deleting the shortcut on desktop

            $ShortcutsToDelete = Get-ChildItem -Path "C:\Users\$env:username\Desktop" -Filter "zluri.lnk"

            $ShortcutsToDelete | ForEach-Object {

                Remove-Item -Path $_.FullName

            }

        }

    }

# function to create client-config.json file

function zluriClientConfigFiles{

    # reading param

    Param([String]$configFolderPath)

    # Setting variable for folder path & file path

    $folderPath = $("$configFolderPath\zluri")

    $filePath=$("$folderPath\client-config.json")

    # If there is no folderPath then create a zluri folder in that specific location

    If (-not (Test-Path $folderPath)) {

        Log-Message "Creating zluri folder in $folderPath"

        New-Item -Path $folderPath -ItemType "directory"

    }

    # If there is a client-config.json file in the filepath remove the file

    If (Test-Path $filePath) {

        Log-Message "deleting existing $filePath"

        Remove-Item $filePath

    }

    # Create client-config.json file in the filepath & insert the values

    New-Item -Path $filePath -ItemType "file" -value $configValues

    Log-Message "Created client config file in $filePath"

}

# Calling the function to create client-config.json file in programdata

zluriClientConfigFiles -configFolderPath $env:programdata

# Calling the function to create client-config.json file in localappdata

zluriClientConfigFiles -configFolderPath $env:localappdata


Replace your organization token in place of <orgToken>

            

SETTING UP THE APPLICATION INSTALLATION

  1. Go to Apps, All Apps.



  2. Click on Add



  3. From the Select App blade, choose the Windows app(Win 32) from the drop-down menu.

    1. Click on the Select button at the bottom of the blade.

  1. Click on “Select app package file”, Add the intune-win file and click on OK.



  1. Fill in the basic details of the application, and click on next.

  1. Change the Install behaviour to “User.” 

Device Restart Behaviour to “No Specific Action

Click on Next

  1. Operating System Architecture: Select both 32 Bit and 64 Bit

Minimum OS: The first Option present


Configure additional requirement rules:

  1. On the side sheet:
  1. Rule Type: File
  2. Path:
    C:\Users\%USERNAME%\AppData\Local\Programs\zluri\
  3. File or Folder: zluri.exe
  4. Detection method: File or folder does not exist
  5. Click on OK


Click on Next



  1. Rules configure: "Manually configure detection rules”

    1. On the side sheet:

      1. Rule Type: File

      2. Path: C:\Users\%USERNAME%\AppData\Local\Programs\zluri\

      3. File or Folder: zluri.exe

      4. Detection method: File or folder exists

      5. Click on OK

    2. Click on Next.

  1. Click Next for dependencies.

  2. Click Next for Supersedence.

  3. In assignments, choose the same devices/users/groups that were chosen for the script and click on next.

  1. Click on Next, Click on Create.


On installation of the scripts first and then the application, all the devices are {org_token} authenticated and are listed in the Sources → Agents → Desktop Agents Page.



The mapping of the device to the user can be done in 3 ways:

  1. Integration with Intune: We will get the user to device mapping, and the user authentication is handled with this data by Zluri

  2. Manually

  3. In development: An option to Bulk Upload a CSV with user-to-device mapping on the UI. For the time being, we can handle the bulk mapping from Zluri’s support team.


Once the User is authenticated with the Organization Token, The agent looks something like this until the user authentication is complete by the admin:


For Uninstallation:

Sometimes, in a few Windows systems, on uninstallation of the Zluri Agent, it requires a restart for the changes to reflect in the system. 


An admin mode is introduced, which is activated with a hotkey; only then logout, quit, and force restart the agent is possible → preferred and not to be shared with all the users.


Can’t find what you are looking for? Let us help you!

Deployment of Zluri Windows Agent using MS Intune

Modified on Mon, 01 Apr 2024 at 10:45 PM

Windows Agent Version: 3.2.5

Windows Versions tested on: Windows 11, Windows 10


  1. Login to your MS Intune

SETTING UP THE SCRIPTS

  1. Navigate to Devices and search for Scripts



  2. Click on Add

  3. Choose Windows or Later

  1. Add the basic Details like name and description
    Name: Zluri script
    Description: Zluri script for agent installation

  1. In the “Script settings.”

Add the script file, 

Run this script using the logged-on credentials: Yes

Enforce script signature check: No

Run a script in 64-bit PowerShell Host: Yes

Click on “Next


  1. Assign it to a group/all devices/all users based on how this is being deployed; click on Next.


  1. Click on add

                

The recommended way of implementation is first to assign the scripts and then assign the application.

Script:

Save the file with an extension: .ps1

Example: windowsScript.ps1


#expected version. zluri apps lesser than this version will get uninstalled.

$expectedVersion="3.2.5.0"

#Values to insert into client-config.json file

$configValues='{"org_token": "<orgToken>","interval": "3600000"}'

#########################################################################################

    # Path for zluri script logs

$logPathRoot=$env:programdata

If (-not (Test-Path "$logPathRoot\zluri")) {

        Log-Message "Creating zluri folder in $folderPath"

        New-Item -Path "$logPathRoot\zluri" -ItemType "directory"

    }

    # Logger function

Function Log-Message([String]$Message)

{

    Add-Content -Path "$logPathRoot\zluri\zluriscriptlog.txt" $Message

}

    # Specify the expected version in the same format

$logDate=Get-date

Log-Message "$logDate"

    # Get the installed zluri apps

$isZluriApp=Get-WmiObject -Class Win32_Product | where name -eq zluri

Log-Message "$isZluriApp"

    # For each zluri agent present in the system

    foreach($zluriApp in $isZluriApp){

        Log-Message "$zluriApp"

        $currentVersion=$zluriApp.version

            # Check if expected version is greater than the installed zluri version

        if($expectedVersion -gt $currentVersion){

            Log-Message "checking if $expectedVersion greater than $currentVersion"

            $zluriProcess=Get-Process -Name "zluri"

                # stopping all zluri process

            Log-Message "$zluriProcess"

            $nid = (Get-Process zluri).id

                Stop-Process -Id $nid

                Wait-Process -Id $nid -ErrorAction SilentlyContinue

                # Uninstalling zluri app

            $zluriApp.uninstall() | Out-Null

                # deleting zluri folder from %localappdata%\programs

            Remove-Item C:\Users\$env:username\AppData\Local\Programs\zluri -Recurse -Force -ErrorAction silentlycontinue

            Remove-Item C:\Users\$env:username\AppData\Roaming\zluri -Recurse -Force -ErrorAction silentlycontinue

                # deleting the shortcut on desktop

            $ShortcutsToDelete = Get-ChildItem -Path "C:\Users\$env:username\Desktop" -Filter "zluri.lnk"

            $ShortcutsToDelete | ForEach-Object {

                Remove-Item -Path $_.FullName

            }

        }

    }

# function to create client-config.json file

function zluriClientConfigFiles{

    # reading param

    Param([String]$configFolderPath)

    # Setting variable for folder path & file path

    $folderPath = $("$configFolderPath\zluri")

    $filePath=$("$folderPath\client-config.json")

    # If there is no folderPath then create a zluri folder in that specific location

    If (-not (Test-Path $folderPath)) {

        Log-Message "Creating zluri folder in $folderPath"

        New-Item -Path $folderPath -ItemType "directory"

    }

    # If there is a client-config.json file in the filepath remove the file

    If (Test-Path $filePath) {

        Log-Message "deleting existing $filePath"

        Remove-Item $filePath

    }

    # Create client-config.json file in the filepath & insert the values

    New-Item -Path $filePath -ItemType "file" -value $configValues

    Log-Message "Created client config file in $filePath"

}

# Calling the function to create client-config.json file in programdata

zluriClientConfigFiles -configFolderPath $env:programdata

# Calling the function to create client-config.json file in localappdata

zluriClientConfigFiles -configFolderPath $env:localappdata


Replace your organization token in place of <orgToken>

            

SETTING UP THE APPLICATION INSTALLATION

  1. Go to Apps, All Apps.



  2. Click on Add



  3. From the Select App blade, choose the Windows app(Win 32) from the drop-down menu.

    1. Click on the Select button at the bottom of the blade.

  1. Click on “Select app package file”, Add the intune-win file and click on OK.



  1. Fill in the basic details of the application, and click on next.

  1. Change the Install behaviour to “User.” 

Device Restart Behaviour to “No Specific Action

Click on Next

  1. Operating System Architecture: Select both 32 Bit and 64 Bit

Minimum OS: The first Option present


Configure additional requirement rules:

  1. On the side sheet:
  1. Rule Type: File
  2. Path:
    C:\Users\%USERNAME%\AppData\Local\Programs\zluri\
  3. File or Folder: zluri.exe
  4. Detection method: File or folder does not exist
  5. Click on OK


Click on Next



  1. Rules configure: "Manually configure detection rules”

    1. On the side sheet:

      1. Rule Type: File

      2. Path: C:\Users\%USERNAME%\AppData\Local\Programs\zluri\

      3. File or Folder: zluri.exe

      4. Detection method: File or folder exists

      5. Click on OK

    2. Click on Next.

  1. Click Next for dependencies.

  2. Click Next for Supersedence.

  3. In assignments, choose the same devices/users/groups that were chosen for the script and click on next.

  1. Click on Next, Click on Create.


On installation of the scripts first and then the application, all the devices are {org_token} authenticated and are listed in the Sources → Agents → Desktop Agents Page.



The mapping of the device to the user can be done in 3 ways:

  1. Integration with Intune: We will get the user to device mapping, and the user authentication is handled with this data by Zluri

  2. Manually

  3. In development: An option to Bulk Upload a CSV with user-to-device mapping on the UI. For the time being, we can handle the bulk mapping from Zluri’s support team.


Once the User is authenticated with the Organization Token, The agent looks something like this until the user authentication is complete by the admin:


For Uninstallation:

Sometimes, in a few Windows systems, on uninstallation of the Zluri Agent, it requires a restart for the changes to reflect in the system. 


An admin mode is introduced, which is activated with a hotkey; only then logout, quit, and force restart the agent is possible → preferred and not to be shared with all the users.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article