Here are the steps to detect, disable and enable SMBv1 client and server by using PowerShell commands with elevation.
NB: The computer will need to be restarted to complete enabling or disabling SMBv1.