A few tweaks to @Jstev’s code that may suit your use case
Relevance
exists network shares whose (exists trustee whose (it as string = "Everyone") of entries of dacls of security descriptors of it)
Action
createfile until EOF
{concatenation "%0d%0a" of ("Revoke-SmbShareAccess '" & it & "' -AccountName 'Everyone' -Force") of (names of network shares whose (exists trustee whose (it as string = "Everyone") of entries of dacls of security descriptors of it))}
EOF
delete removeeveryonefromsmb.ps1
copy __createfile removeeveryonefromsmb.ps1
waithidden powershell -file removeeveryonefromsmb.ps1
Before executing the PS1, maybe run in the fixletdebuger and look in the “C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData__FixletDebugger” folder for the ”removeeveryonefromsmb.ps1” and verify the format and detected shares match your requirements.