To enable or disable SMB on Windows, you can use the Windows Features dialog box or PowerShell commands. For example, to disable SMBv1, you can open PowerShell as an administrator and run the command Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol. Similar commands can enable or disable SMBv2 and SMBv3.