Smb1 Status check Powershell, Need some expertise

Hello, I am trying to check the smb1 status on some machines that still had it enabled for an old fileserver. I planned on putting this in a powershell script, but I have a misunderstanding as to the proper way to get the information from the output, Or I am setting the variables wrong in the where-object line. I am only trying to capture the line that has State: Disabled (or Enabled). Here is what I have so far

Import-Module $env:SyncroModule
$smb1 = Get-WindowsOptionalFeature –Online –FeatureName SMB1Protocol
if ($smb1 -notlike $null) {
$smb1status | where-object {$_.State -match “State”} | Select-Object -ExpandProperty smb1Status
}

if ($smb1Status -notlike $null) {
Set-Asset-Field -Name “smb1” -Value “$smb1Status”
}

For reference an expected output would look something like this
FeatureName : SMB1Protocol
DisplayName : SMB 1.0/CIFS File Sharing Support
Description : Support for the SMB 1.0/CIFS file sharing protocol, and the Computer Browser protocol.
RestartRequired : Possible
State : Disabled
CustomProperties :
ServerComponent\Description : Support for the SMB 1.0/CIFS file sharing protocol, and the Computer
Browser protocol.
ServerComponent\DisplayName : SMB 1.0/CIFS File Sharing Support
ServerComponent\Id : 487
ServerComponent\Type : Feature
ServerComponent\UniqueName : FS-SMB1
ServerComponent\Deploys\Update\Name : SMB1Protocol

try replacing

$smb1status | where-object {$_.State -match “State”} | Select-Object -ExpandProperty smb1Status

with

$smb1status = $smb1.State

Thank You

That was exactly the fix.