Open the Run command box by searching for "Run," pressing Windows-R, or moving your mouse pointer to the lower-left corner of the Desktop screen, right-clicking, and selecting Run in the Quick Access menu.
Now type
gpedit.msc
and press Enter to open the Local Group Policy Editor. Navigate to Computer Configuration > Administrative Templates > Control Panel >Personalizationin the left menu. Double-click the Do Not Display the Lock Screen option in the main pane to open a new window. Select the Enabled radio button, click OK