Here is how to do it.
Step 1: PressWin + Ito kick off the Windows prefs window.
Step 2: ChooseSystemand switch to theRemote Desktoptab.

you might toggle the switch toOffunder the Enable Remote Desktop section.
Step 1: TypeControl Panelinto the Windows search bar and hitEnterto bring up the window.
Step 2: Navigate toSystem and Security>System>Allow remote access.

Step 3: In the prompt window, chooseDont allow remote connections to this computerand clickApplyto save the change.
Youd betterback up registry keysbefore tweaking them, then follow the steps below to modify the key.
Step 1: PressWin + Rto launch the Run window.

Step 3: Navigate toHKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>Control>Terminal Server.
Step 4: Find thefDenyTSConnections subkeyon the right pane.
Then, rename the newly created subkey asfDenyTSConnections.

Step 5: Double-tap on the subkey and change theValue datato1.
Step 6: ClickOKto save the change.
Step 2: Typegpedit.mscinto the text box and hitEnterto kick off the window.
Step 4: Find theAllow users to connect remotely by using Remote Desktop Servicespolicy on the right pane.
Step 5: Double-tap on the policy and chooseDisabled.
Step 6: ClickApply>OKin sequence to save the change.
Can yourecover files from a connection drive?
The answer is positive.
you could tryMiniTool Power Data Recoveryto get files back.
Running this software can get your files back securely with a clean data recovery software environment.
Bottom Line
This is all about how to turn off remote connection on Windows 10.
Hope you’ve got the option to resolve your problem after reading this post.