Skip to content

Instantly share code, notes, and snippets.

@keyboardcrunch
Created January 19, 2021 14:05
Show Gist options
  • Select an option

  • Save keyboardcrunch/921e9f87249d3ffea35c97c6757f99ac to your computer and use it in GitHub Desktop.

Select an option

Save keyboardcrunch/921e9f87249d3ffea35c97c6757f99ac to your computer and use it in GitHub Desktop.
SMB - CMPivot Queries
@0daydorpher
SMBConfig
| summarize countif( (EnableSMB1Protocol == true) ) by Device
| where (countif_ > 0)
@IoanPopovici Enabled/Disabled barchart
SMBConfig
| summarize Enabled=countif(EnableSMB1Protocol == true) by Device
| summarize NumberOfDevices=count() by iif(Enabled==1,'Enabled','Disabled')
| render barchart with (title='SMBv1 Status', xtitle='Status', ytitle='Number of Devices')
OptionalFeature
| where Name == 'smb1protocol' and InstallState == 1
| join SMBConfig
| summarize Enabled=countif(EnableSMB1Protocol == true) by Device
| summarize NumberOfDevices=count() by iif(Enabled==1, 'Enabled','Disabled')
| render barchart with (title='SMBv1 Status', xtitle='Status', ytitle='Number of Devices')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment