Files
Intune/intune/Externally Sourced Remediations/Miscellaneous/Get-GenericRegistryChange/Detect_GenericRegistryChange.ps1
2025-05-19 15:19:36 -04:00

11 lines
346 B
PowerShell

# (Detect_GenericRegistryChange.ps1)
# Detect if the registry key exists
$RegistryPath = "HKLM:\SOFTWARE\Microsoft\IntuneManagementExtension\SideCarPolicies\Scripts"
if (Test-Path -Path $RegistryPath) {
Write-Host "Registry key exists: $RegistryPath"
exit 0
} else {
Write-Host "Registry key not found: $RegistryPath"
exit 1
}