Last active
July 16, 2018 14:11
-
-
Save oflow/38ae9480195c75295391b5c123ef942d to your computer and use it in GitHub Desktop.
Windows 10でNASが繋がらないときにSMB1.0とサービスを有効にするやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
openfiles > NUL 2>&1 | |
if %ERRORLEVEL% equ 0 ( | |
@echo on | |
rem Enable Function Discovery Provider Host | |
sc config fdPHost start=auto | |
sc start fdPHost | |
rem Enable Function Discovery Resource Publication | |
sc config FDResPub start=auto | |
sc start FDResPub | |
rem Enable SMB1.0/CIFS Protocol | |
rem - Enable SMB1.0/CIFS Server, Client | |
dism /NoRestart /Online /Enable-Feature /FeatureName:SMB1Protocol | |
dism /NoRestart /Online /Enable-Feature /FeatureName:SMB1Protocol-Client | |
dism /NoRestart /Online /Enable-Feature /FeatureName:SMB1Protocol-Server | |
echo "PCを再起動してください" | |
) else ( | |
echo "管理者として実行してください" | |
) | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment