Skip to content

Instantly share code, notes, and snippets.

@DamagedDingo
Created December 15, 2023 02:49
Show Gist options
  • Save DamagedDingo/cd529d2d1873759caa3da6ceb530626d to your computer and use it in GitHub Desktop.
Save DamagedDingo/cd529d2d1873759caa3da6ceb530626d to your computer and use it in GitHub Desktop.
Intune Remediation Sample
if ( $(Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Policies\Google\Chrome\" -Name "BrowserSignin") -ne 2) ) {
# Not found, exit with 1 to trigger remidiation.
exit 1
}
else {
# Value found, exit 0
Write-Output "Some Output Must Be Written to STDOUT"
exit 0
}
Set-ItemPropertyValue -Path "HKLM:\SOFTWARE\Policies\Google\Chrome\" -Name "BrowserSignin" -Value 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment