我正在使用Windows 2008 R2。我想知道我的服务器上启用了哪个版本的SMB。
我在PowerShell中使用了以下命令来了解安装的smb版本:sc.exe qc lanmanworkstation
在其输出中,依赖项显示了SMB的两个版本:MRxSmb10
和MRxSmb20
。
现在,已经安装了两个版本,在我的服务器上启用了哪个SMB版本?由于windows 2008 R2不支持get-smbconnection
命令,所以我无法确定具体版本。
我还检查了注册表路径HKEY_LOCAL_MACHINE\\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
,并且没有关于SMB版本的条目。
如果SMB版本不止一个,请告诉我如何确定服务器上启用了哪个SMB版本?
发布于 2018-03-16 11:11:17
如果您没有看到HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
包含SMB1
的键和禁用的REG_DWORD: 0
,那么它就被启用了,这与另一个表示lanmanworkstation
对MRxSmb10
和RxSmb20
都有依赖关系的方法加起来了。
如Windows 2008 如何检测、启用和禁用SMBv3 1、SMBv3 2和SMBv3 3部分所述,您可以使用
sc.exe config lanmanworkstation depend= bowser/mrxsmb20/nsi
sc.exe config mrxsmb10 start= disabled
在此之后,sc.exe query lanmanworkstation
应该只显示MRxSmb20
。
发布于 2022-01-23 15:10:52
echo Verification de l'etat des protocoles SMB : echo --------------------------------------- echo. for %%V in (1 2) do ( for /F %%L in ('sc qc lanmanworkstation ^| find "mrxsmb%%V0"') do ( echo - Le gestionnaire reseau depend du protocole SMB V%%V for /F %%S in ('sc query mrxsmb%%V0 ^| find /C "RUNNING"') do ( IF %%S EQU 1 ( echo OK, le service SMB V%%V est en cour d'execution, poursuite de l'execution du script ) else ( echo. echo ******************************************************************************************************** echo SMB V%%V n'est pas en cours d'execution, arret du script echo Dans une console administrateur, taper les commandes ci-dessous puis redémarrer le poste si nécessaire : echo. echo C:^> sc qc lanmanworkstation ^(pour visualiser les dependances, mrxsmb10 = SMB V1, mrxsmb20 = SMB V2^) echo C:^> sc config lanmanworkstation depend= bowser/mrxsmb20/nsi ^(Pour exclure la dependance du protocole SMB V1^) echo C:^> sc config mrxsmb10 start= disabled ^(Pour désactiver SMB V1^) echo C:^> sc config mrxsmb20 start= auto ^(Pour lancer automatiquement SMB V2^) echo C:^> net stop workstation /YES ^(Pour redémarrer le service^) echo C:^> net start workstation echo ******************************************************************************************************** goto END_SCRIPT ) ) ) )
https://serverfault.com/questions/901976
复制相似问题