I wrote this script to quickly check a computer to see if SMB1 is disabled on a computer. The script uses PowerShell remoting to check both the server and client SMB1 protocols are disabled. You need to disable SMB1 on your network.

5 Star
1,190 times
Add to favorites
Operating System
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Easiest Way to capture the results
    2 Posts | Last post June 16, 2017
    • Whats the easiest way to write this out to a log file or html report?
    • The easiest way is to use Start-Transcript.
      Also you could save the output of your command to a variable. Then send it to html or csv.
      PS C:\> Start-Transcript -Path C:\Logs\smb1transcript.log
      PS C:\> $Smb1Results = Get-ADComputer -Filter * | Select-Object -ExpandProperty Name | Get-SMBStatus -Verbose
      PS C:\> $Smb1Results | ConvertTo-Csv -NoTypeInformation | Out-File C:\Logs\Smb1Results.csv
      PS C:\> Stop-Transcript
  • how to use your code
    3 Posts | Last post June 05, 2017
    • JA, 
       appreciate what you provided, however I am wonder how to utilize the code....I do have powershell 3.0 installed on my workstation win7...I would like to check a multiple servers in a network, am fairly new at scripting...I just don't see how you identify objects in the script to 'server01, 02 etc' to run against and pull back status...
      any help would be much appreciated thanks
    • You can reference the built-in help examples to start. Get-Help Get-SMB1Status. 
      Also keep in mind this is a function which needs to be "dot sourced" into memory.
      PS C:\Scripts> . .\Get-SMB1Status.ps1
      PS C:\Scripts> Get-Help Get-SMB1Status
      Other examples:
      PS C:\> Get-ADComputer -Filter * | Get-SMB1Status
      PS C:\> Get-Content C:\Temp\ComputerList.txt | Get-SMB1Status
    • Actually that AD Computer example needs to be like this:
      PS C:\> Get-ADComputer -Filter * | Select-Object -ExpandProperty Name | Get-SMB1Status