|
# Check Nahimic service status |
|
$nahimicService = Get-Service -Name "Nahimic service" -ErrorAction SilentlyContinue |
|
|
|
if ($nahimicService) { |
|
if ($nahimicService.Status -eq "Running") { |
|
Write-Host "Nahimic service is currently running." -ForegroundColor Yellow |
|
Write-Host "Advice: If you're experiencing issues related to Nahimic or high CPU/RAM usage, consider stopping and disabling the service." |
|
} |
|
else { |
|
Write-Host "Nahimic service is present but currently not running." -ForegroundColor Green |
|
Write-Host "Advice: If you're not using Nahimic or facing any issues, it's recommended to keep the service disabled." |
|
} |
|
} |
|
else { |
|
Write-Host "Nahimic service is not installed or not found." -ForegroundColor Green |
|
Write-Host "Advice: If you're not using Nahimic or facing any issues, there's no need to install or enable the service." |
|
} |
|
|
|
# Check Nahimic mirroring device |
|
$nahimicMirroringDevice = Get-PnpDevice | Where-Object { $_.Class -eq "Media" -and $_.FriendlyName -like "*Nahimic mirroring*" } |
|
|
|
if ($nahimicMirroringDevice) { |
|
Write-Host "Nahimic mirroring device is present." -ForegroundColor Yellow |
|
Write-Host "Advice: If you're not using Nahimic or facing any issues, consider disabling or uninstalling the Nahimic mirroring device." |
|
} |
|
else { |
|
Write-Host "Nahimic mirroring device is not found." -ForegroundColor Green |
|
Write-Host "Advice: If you're not using Nahimic or facing any issues, there's no need to disable or uninstall the mirroring device." |
|
} |
|
|
|
# Check Nahimic-related registry keys |
|
$nahimicRegistryKeys = @( |
|
"HKLM:\SYSTEM\CurrentControlSet\Services\NahimicService", |
|
"HKLM:\SYSTEM\CurrentControlSet\Services\Nahimic_Mirroring", |
|
"HKCU:\SOFTWARE\A-Volute" |
|
) |
|
|
|
$missingRegistryKeys = $nahimicRegistryKeys | Where-Object { -not (Test-Path -Path $_) } |
|
|
|
if ($missingRegistryKeys) { |
|
Write-Host "Some Nahimic-related registry keys are missing." -ForegroundColor Green |
|
Write-Host "Advice: If you're not using Nahimic or facing any issues, there's no need to add or modify the registry keys." |
|
} |
|
else { |
|
Write-Host "All Nahimic-related registry keys are present." -ForegroundColor Yellow |
|
Write-Host "Advice: If you're not using Nahimic or facing any issues, consider removing or modifying the registry keys." |
|
} |
|
|
|
# Check Nahimic-related files and folders |
|
$nahimicFolders = "C:\Windows\System32\A-Volute", "C:\Program Files (x86)\MSI\One Dragon Center\Nahimic" |
|
$nahimicFiles = "C:\Windows\System32\NahimicService.exe", "$env:APPDATA\Local\NhNotifSys" |
|
|
|
$missingFolders = $nahimicFolders | Where-Object { -not (Test-Path -Path $_) } |
|
$missingFiles = $nahimicFiles | Where-Object { -not (Test-Path -Path $_) } |
|
|
|
if ($missingFolders -or $missingFiles) { |
|
Write-Host "Some Nahimic-related files or folders are missing." -ForegroundColor Green |
|
Write-Host "Advice: If you're not using Nahimic or facing any issues, there's no need to have these files or folders present on your system." |
|
|
|
if ($missingFolders) { |
|
Write-Host "Missing folders:" -ForegroundColor Yellow |
|
$missingFolders | ForEach-Object { |
|
Write-Host " $_" |
|
} |
|
} |
|
|
|
if ($missingFiles) { |
|
Write-Host "Missing files:" -ForegroundColor Yellow |
|
$missingFiles | ForEach-Object { |
|
Write-Host " $_" |
|
} |
|
} |
|
} |
|
else { |
|
Write-Host "All Nahimic-related files and folders are present." -ForegroundColor Yellow |
|
Write-Host "Advice: If you're not using Nahimic or facing any issues, consider removing or modifying these files and folders." |
|
} |
|
|
|
# Check Nahimic-related tasks in Task Scheduler |
|
$nahimicTasks = Get-ScheduledTask | Where-Object { $_.TaskPath -match "Nahimic|A-Volute" } |
|
|
|
if ($nahimicTasks) { |
|
Write-Host "Nahimic-related tasks are present in Task Scheduler." -ForegroundColor Yellow |
|
Write-Host "Advice: If you're not using Nahimic or facing any issues, consider disabling or removing these tasks." |
|
} |
|
else { |
|
Write-Host "No Nahimic-related tasks found in Task Scheduler." -ForegroundColor Green |
|
Write-Host "Advice: If you're not using Nahimic or facing any issues, there's no need to modify Task Scheduler." |
|
} |
|
|
|
# Check Nahimic Store App installation |
|
$nahimicStoreApp = Get-AppxPackage -Name "*nahimic*" -ErrorAction SilentlyContinue |
|
|
|
if ($nahimicStoreApp) { |
|
Write-Host "Nahimic Store App is installed." -ForegroundColor Yellow |
|
Write-Host "Advice: If you're not using Nahimic or facing any issues, consider uninstalling the Nahimic Store App." |
|
} |
|
else { |
|
Write-Host "Nahimic Store App is not installed." -ForegroundColor Green |
|
Write-Host "Advice: If you're not using Nahimic or facing any issues, there's no need to uninstall the Nahimic Store App." |
|
} |
|
|
|
# Check Nahimic-related device ID blacklist |
|
$denyDeviceIDsKey = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeviceInstall\Restrictions\DenyDeviceIDs" |
|
$deviceIDBlacklist = @( |
|
"ROOT\Nahimic_Mirroring", |
|
"SWC\VEN_AVOL&AID_0300", |
|
"SWC\VEN_AVOL&AID_0400" |
|
) |
|
|
|
$blacklistedIDs = $deviceIDBlacklist | Where-Object {(Get-ItemProperty -Path $denyDeviceIDsKey -Name $_ -ErrorAction SilentlyContinue) -ne $null} |
|
|
|
if ($blacklistedIDs) { |
|
Write-Host "Nahimic-related device IDs are blacklisted." -ForegroundColor Yellow |
|
Write-Host "Advice: If you want to prevent further installations of Nahimic-related devices, you can add additional device IDs to the blacklist in the registry." |
|
} |
|
else { |
|
Write-Host "Nahimic-related device IDs are not blacklisted." -ForegroundColor Green |
|
Write-Host "Advice: If you're not experiencing issues or don't want to restrict device installations, there's no need to modify the device ID blacklist." |
|
} |
You might want to incorporate some usage of the trusted-installer account into the removal because on recent msi updates it is now protected from administrator group removal.
https://github.com/jschicht/RunAsTI