The output in the below PowerShell script for window will tell you whether the Druva Insync client is detected as installed and provide information about the installation folder and service status.
# Script to verify Druva inSync client installation on Windows
# ------------------------------------------------------------------
# Configuration
# ------------------------------------------------------------------
$InsyncAppName = "Druva inSync"
$InsyncInstallPaths = @(
"C:\Program Files\Druva\inSync",
"C:\Program Files (x86)\Druva\inSync"
)
$LogFolder = "C:\Druva_Status"
$LogFile = Join-Path $LogFolder "Druva_Status.log"
# Create log folder if it does not exist
if (-not (Test-Path -Path $LogFolder)) {
New-Item -Path $LogFolder -ItemType Directory -Force | Out-Null
}
# ------------------------------------------------------------------
# Logging function
# ------------------------------------------------------------------
function Write-Log {
param(
[Parameter(Mandatory)]
[string]$Message,
[ValidateSet("White","Green","Yellow","Red","DarkGreen")]
[string]$Color = "White"
)
$TimeStamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
$LogEntry = "$TimeStamp - $Message"
Write-Host $LogEntry -ForegroundColor $Color
Add-Content -Path $LogFile -Value $LogEntry
}
# ------------------------------------------------------------------
# Check installation using registry (preferred over Win32_Product)
# ------------------------------------------------------------------
$RegistryPaths = @(
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*",
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
)
$InstalledApp = Get-ItemProperty -Path $RegistryPaths -ErrorAction SilentlyContinue |
Where-Object { $_.DisplayName -like "*$InsyncAppName*" } |
Select-Object -First 1
if ($InstalledApp) {
Write-Log -Message "Druva inSync client is installed." -Color Green
}
else {
Write-Log -Message "Druva inSync client is NOT installed." -Color Red
}
# ------------------------------------------------------------------
# Check installation folder
# ------------------------------------------------------------------
$FoundPath = $InsyncInstallPaths | Where-Object { Test-Path $_ } | Select-Object -First 1
if ($FoundPath) {
Write-Log -Message "Installation folder found at: $FoundPath" -Color DarkGreen
}
else {
Write-Log -Message "Installation folder NOT found." -Color Yellow
}
# ------------------------------------------------------------------
# Check inSync service
# ------------------------------------------------------------------
$InsyncService = Get-Service -Name "inSyncCPHService" -ErrorAction SilentlyContinue
if ($InsyncService) {
Write-Log -Message "inSyncCPHService is present. Status: $($InsyncService.Status)" -Color DarkGreen
}
else {
Write-Log -Message "inSyncCPHService is NOT present." -Color Red
}
How to Use This Script:
Open PowerShell: Open PowerShell as an administrator on the target Windows 10 or Windows 11 device.
Copy and Paste: Copy the entire script and paste it into the PowerShell window.
Run the Script: Press Enter to execute the script.
This script will also create the following folder on the user’s device -
C:\Druva_Status
The above directory will contain the log file containing the status of the output
Druva inSync client is installed.
Druva inSync client is NOT installed.
