I can use Get-SmbServerConfiguration | Select EnableSMB2Protocol

to get table style result:

enter image description here

How can I get bool result which in this case would be False

I'm working on DSC, and currently working on SMB script.


Don't bother piping to Select-Object if you just want to read the property value. The object returned from Get-SmbServerConfiguration has it already.

$smbConfig = Get-SmbServerConfiguration


Or shorthand as (Get-SmbServerConfiguration).EnableSMB2Protocol

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.