All scripts
Automation 637
Clear-DnsCache (Proactive Remediation)
An Intune Proactive Remediation pair: the detection script always flags non-compliant, the remediation script flushes the local DNS cache. Deploy on a schedule to quietly clear a common source of "the site won't load" tickets.
Clear-DnsCache.ps1
# Source: JayRHa/EndpointAnalyticsRemediationScripts (MIT License)
# https://github.com/JayRHa/EndpointAnalyticsRemediationScripts/tree/main/Clear-DnsCache
# An Intune Proactive Remediation pair.
# Deploy as an Intune Proactive Remediation: detection script first, then remediation.
# ============================================================
# detection_Clear-DnsCacheDetection.ps1
# ============================================================
<#
Version: 1.0
Author:
Shehryar Hassan
Script: Clear-DnsCache
Hint: This is a community script. There is no guarantee for this. Please check thoroughly before running.
Run as: Admin
Context: 64 Bit
#>
# Always trigger
Write-Host "Script will always be triggered"
exit 1
# ============================================================
# remediation_Clear-DnsCacheRemediation.ps1
# ============================================================
<#
Version: 1.0
Author:
Shehryar Hassan
Script: Clear-DnsCache
Run as: Admin
Context: 64 Bit
#>
ipconfig /flushdnsRead it before you run it, and test in a safe tenant first.