Intune policy to block the network sharing specifically SMB ports

Balasundaram Muthukumarasamy 20 Reputation points
2025-04-17T07:11:06.16+00:00

Hi all, kindly let me know if there were any Intune policy available to block the network drive sharing from local system access, specifically SMB port blocking.

Microsoft Security | Intune | Configuration
0 comments No comments
{count} votes

Answer accepted by question author
  1. Ishan Gupta 75 Reputation points
    2025-04-17T09:51:53.97+00:00

    Solution in Win 11/Win 10 all versions

    If you're looking for a more custom solution, you can deploy a PowerShell Script via Intune to disable or block SMB ports.

    Firstly Go to Windows-Powershell Scripts-then Add these scripts

    1. Disable SMBv1, SMBv2, and SMBv3 protocols (Optional)

    Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force

    Set-SmbServerConfiguration -EnableSMB2Protocol $false -Force

    2 . Block SMB port (445)in Windows Firewall

    New-NetFirewallRule -DisplayName "Block SMB Port 445" -Direction Inbound -Protocol TCP -LocalPort 445 -Action Block


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.