New
#1
CMD scripts to toggle smb share?
I want to keep smb share disabled when i don't need it and enable it only when i need it. Is there a way to create .bat scripts to toggle smb share?
I want to keep smb share disabled when i don't need it and enable it only when i need it. Is there a way to create .bat scripts to toggle smb share?
yes, i think this is what u want
- have you seen Google?
Enable or Disable SMB1 File Sharing Protocol in Windows | Tutorials
Disable
#Code:Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 –ForceCode:o= disable 1= enable
This is not cmd command but powershell command, and it doesn't work. I am still able to login to my pc from my smb client on my android tablet.
You need to re-start the computer for the prescribed changes to take effect.
References:
Enable or Disable SMB1 in Windows 7 using PowerShell | Ten Forums
From cmd, you can use net share to manage shared resources. But, this command only allows the user to create or delete a share. i.e., there is no provision to enable or disable.
References:
Net share | Microsoft Docs
I restarted my pc but i am still able to connect to my pc from my android smb client which means that smb share is still not disabled.