Public/Get-MerakiNetworkSecurityMalware.ps1

function Get-MerakiNetworkSecurityMalware {
    <#
    .SYNOPSIS
    Gets the malware settings for a specified network.
 
    .DESCRIPTION
    This function retrieves the malware settings configured for a specified Meraki network using the Meraki Dashboard API.
 
    .PARAMETER AuthToken
    The Meraki Dashboard API token to use for authentication.
 
    .PARAMETER NetworkId
    The ID of the network to retrieve malware settings for.
 
    .EXAMPLE
    PS C:\> Get-MerakiNetworkSecurityMalware -AuthToken "1234" -NetworkId "N_12345678"
 
    Returns the malware settings for the network with ID "N_12345678".
 
    .NOTES
    For more information on the Meraki Dashboard API, visit https://developer.cisco.com/meraki/api/.
    #>

    [CmdletBinding()]
    param (
        [parameter(Mandatory=$true)]
        [string]$AuthToken,

        [parameter(Mandatory=$true)]
        [string]$NetworkId
    )

    try {
        $header = @{
            'X-Cisco-Meraki-API-Key' = $AuthToken
        }
        $response = Invoke-RestMethod -Method Get -Uri "https://api.meraki.com/api/v1/networks/$NetworkId/appliance/security/malware" -Header $header -UserAgent "MerakiPowerShellModule/1.0.2 DocNougat"
        return $response
    }
    catch {
        Write-Debug $_
        Throw $_
    }
}