Skip to content

Instantly share code, notes, and snippets.

@oflow
Last active July 16, 2018 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oflow/38ae9480195c75295391b5c123ef942d to your computer and use it in GitHub Desktop.
Save oflow/38ae9480195c75295391b5c123ef942d to your computer and use it in GitHub Desktop.
Windows 10でNASが繋がらないときにSMB1.0とサービスを有効にするやつ
@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