How to Check SMBv1 and disable it RRS feed

  • Question

  • hey 

    I wanna query server or clients (not diff ) to check smbv1 status and if it is enable run command for disable it , so i write some line in powershell but i'm not sure it working properly :

    $Servers = (Get-ADComputer -Filter {OperatingSystem -like "server"})
    $SBMv1 = Get-SmbServerConfiguration | Select EnableSMB1Protocol
    foreach ($Server in $Servers){ 
        if ($SBMv1 -eq $true) {
            Set-SmbServerConfiguration -EnableSMB1Protocol $false -confirm:$true

    • Moved by Bill_Stewart Friday, July 7, 2017 6:15 PM This is not "scripts on demand"
    Sunday, May 14, 2017 9:58 AM

All replies

  • Start with "help get-SmbServerConfiguration -full"

    Read how to use the CmdLet.

    Look at how to use the CmdLet t remote computers.


    Sunday, May 14, 2017 11:08 AM