Overview
This page provides a sample script required to silently install and activate the Josys browser extension on Windows devices using Microsoft Intune.
This is intended for users who fall under Case F (when user variables cannot be used) in How to Silently Install and Activate the Extension on Windows Devices Using Intune (2/2).
Reference: How to Silently Install and Activate the Extension on Windows Devices Using Intune (2/2)
Target Audience
Administrators planning and executing the bulk deployment of the Josys browser extension.
About the Browser Extension
Please refer to the following pages first for information regarding the browser extension.
1. About the Browser Extension
2. How to Use the Browser Extension
Script
Save the script below to run it in the system context.
- Copy the script below and paste it into a text editor such as Notepad.
- Replace YOUR_ORGANIZATION_KEY on the second line with your company's organization ID found in Josys.
- Save the file with the name "josys-extension-config.ps1".
- Verify that the file type is "Windows PowerShell script".
- Return to How to Silently Install and Activate the Extension on Windows Devices Using Intune (2/2) - 2. Apply the script to target devices to proceed with the setup.
####### Write Organization ID to Registry #######
$organizationKey = "YOUR_ORGANIZATION_KEY"
# Define the target registry paths in an array
$registryPaths = @(
# Path for Edge
"HKLM:\Software\Policies\Microsoft\Edge\3rdparty\extensions\hjifncajikcdkhlofdjjlhcjoennmdfc\policy",
# Path for Chrome
"HKLM:\Software\Policies\Google\Chrome\3rdparty\extensions\moaklgcgokbgplldonjkoochhlefkbjf\policy"
)
####### Get Device Name ########
$devicename = (Get-WmiObject -Class Win32_ComputerSystem).Name
# Process each path stored in the array
foreach ($path in $registryPaths) {
Write-Host "Processing registry path: $path"
# Create the parent path if it does not exist
$parentPath = Split-Path -Path $path
if (!(Test-Path $parentPath)) {
New-Item -Path $parentPath -Force -ItemType Directory | Out-Null
}
# Write to registry
# Organization ID
New-ItemProperty -Path $path -Name "OrganizationKey" -Value $organizationKey -Force
# Device Name
New-ItemProperty -Path $path -Name "DeviceIdentity" -Value $devicename -Force
}
exit 0