How to Efficiently Disable IPv4 IGMP (Multicast) Across Network Adapters: A Handy PowerShell Script

by Team Ninja
reviewed by Stan Hunter
How to Efficiently Disable IPv4 IGMP (Multicast) Across Network Adapters: A Handy PowerShell Script

In the dynamic landscape of IT management, multicast transmissions have been integral in efficient network communication. The IPv4 Internet Group Management Protocol (IGMP) aids in optimizing multicast traffic. But there are instances when disabling it becomes crucial for system administrators. If you've found yourself on the hunt for a reliable way to disable IPv4 IGMP you're in the right place.

Disabling IPv4 IGMP: Why is it Significant? 

  1. Network Traffic Optimization: Multicast can sometimes increase the volume of unnecessary traffic on a network. Disabling IGMP can help manage and reduce superfluous multicast traffic. 
  2. Security Concerns: IGMP can be a vector for specific Distributed Denial of Service (DDoS) attacks. By limiting or disabling it, you safeguard your network from potential vulnerabilities. 
  3. Troubleshooting: When addressing certain network issues, isolating the impact of multicast transmissions becomes essential. Disabling IGMP momentarily can be a useful troubleshooting step. 

About the Script 

IT professionals and Managed Service Providers (MSPs) can benefit immensely from scripts that make processes streamlined. The PowerShell script Disable-IGMP.ps1 is a compact, efficient solution for disabling IPv4 IGMP across all network adapters. 

  • Versatility: The script allows for three operations: 
    • Completely disable sending or receiving IGMP. 
    • Disable sending of IGMP only. 
    • Reset IGMP back to the default settings. 
  • User-Friendly: Even if you're a newbie, the script offers an intuitive experience, with a guide provided through inline comments. 
  • Feedback Loop: Pre and post-execution, the script provides feedback, displaying the IGMP level, ensuring you're always informed. 

Using the Script 

Given its flexibility, using the script is a breeze: 

  • To Disable IGMP Completely: Simply execute the script. No parameters are needed. 
    • PS C:\> Disable-IGMP.ps1
  • To Reset IGMP to Default: Use the -IGMPLevel All parameter. 
    • PS C:\> Disable-IGMP.ps1 -IGMPLevel All

The Script

#Requires -Version 5.1

    Disable IPv4 IGMP(Multicast) for all network adapters
    Disable IPv4 IGMP(Multicast) for all network adapters
    No parameters needed.
    Disabled sending or recieving IGMP
    -IGMPLevel All
    Resets IGMP back to the default
    PS C:\> Disable-IGMP.ps1
    No parameters needed.
    Minimum OS Architecture Supported: Windows 10, Windows Server 2016
    Release Notes:
    Initial Release
    (c) 2023 NinjaOne
    By using this script, you indicate your acceptance of the following legal terms as well as our Terms of Use at
    Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms. 
    Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party. 
    Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library or website belonging to or under the control of any other software provider. 
    Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations. 
    Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks. 
    Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script. 
    EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).

param (
    [ValidateSet("None", "SendOnly", "All")]
    $IGMPLevel = "None"

begin {
    function Test-IsElevated {
        $id = [System.Security.Principal.WindowsIdentity]::GetCurrent()
        $p = New-Object System.Security.Principal.WindowsPrincipal($id)
        if ($p.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator))
        { Write-Output $true }
        { Write-Output $false }
process {
    if (-not (Test-IsElevated)) {
        Write-Error -Message "Access Denied. Please run with Administrator privileges."
        exit 1
    $Before = Get-NetIPv4Protocol | Select-Object -Property IGMPLevel -ExpandProperty IGMPLevel
    Write-Host "IGMP Level currently set to: $Before"
    Set-NetIPv4Protocol -IGMPLevel $IGMPLevel
    $After = Get-NetIPv4Protocol | Select-Object -Property IGMPLevel -ExpandProperty IGMPLevel
    Write-Host "IGMP Level set to: $After"
end {}


Access over 700+ scripts in the NinjaOne Dojo

Get Access

The Security Implications of Disabling IPv4 IGMP 

While we touched upon the broad strokes of security concerns regarding IGMP, it's worth delving deeper: 

  • Bridging the Security Gaps: Multicast traffic, by its nature, is broad in its reach. It can be exploited by malicious actors to sniff out sensitive data, especially if the data is not encrypted. By controlling or disabling IGMP, you can prevent such broad-reach exploits. 
  • Reducing Attack Surfaces: IGMP can sometimes be used in amplification attacks, turning unsuspecting devices into reflectors, redirecting traffic to a target, and causing a Distributed Denial of Service (DDoS). By managing IGMP settings, you limit these vulnerabilities. 
  • Compliance and Best Practices: In some industries, especially where data privacy is paramount, controlling multicast traffic is part of compliance protocols. Disabling IPv4 IGMP can aid in ensuring your network aligns with these best practices. 

Troubleshooting the Script

Even with the most optimized scripts, encountering problems is an occasional inevitability. Here are common problems and their solutions: 

  • Execution Policy Restrictions: PowerShell, by default, might prevent scripts from running due to its execution policy. Resolve this by setting the execution policy to RemoteSigned or bypassing it temporarily: 
    • Set-ExecutionPolicy RemoteSigned
  • Or for a one-time bypass: 
    • PowerShell.exe -ExecutionPolicy Bypass -File .\Disable-IGMP.ps1  
  • Errors in IGMP Level Setting: If you encounter errors regarding invalid parameters or cannot change the IGMP Level, ensure that the operating system is either Windows 10 or Windows Server 2016 and above. Some older systems may lack support for specific PowerShell cmdlets. 
  • Incomplete Change Notifications: If the script doesn’t provide feedback post-execution, it might be an indication of an interrupted process or a script termination. Re-run the script with administrator privileges and ensure no sudden closures or interruptions. 
  • Network Communication Issues Post IGMP Disabling: If network communications are affected post the disabling of IGMP, reset the IGMP settings to their default or consult with your network topology to ascertain if IGMP is essential for certain communication channels. 

Critical Reminders 

  • Elevated Privileges: Ensure you run the script with administrator privileges. The script incorporates a handy function to check and alert if you're not running it as an administrator. 
  • Compatibility: The script is optimized for Windows 10 and Windows Server 2016 and above. 

Final Thoughts

Whether you're an IT professional troubleshooting a complex network issue or an MSP aiming to optimize client network environments, understanding how to efficiently disable IPv4 IGMP is invaluable. And as with any tool, remember always to exercise caution and verify the changes post-execution. 

Next Steps

Building an efficient and effective IT team requires a centralized solution that acts as your core service deliver tool. NinjaOne enables IT teams to monitor, manage, secure, and support all their devices, wherever they are, without the need for complex on-premises infrastructure.

Learn more about Ninja Endpoint Management, check out a live tour, or start your free trial of the NinjaOne platform.

NinjaOne Rated #1 in RMM, Endpoint Management and Patch Management

Monitor, manage, and secure any device, anywhere

NinjaOne gives you complete visibility and control over all your devices for more efficient management.

Too many tools in too many places?

See how tool sprawl impacts IT and what you can do to solve it.