I rebooted a Windows 10 machine into 'Safe Mode with Networking'. It is a physical machine that resides on-site (at a remote location) and does not have ILO (or similar features). I need to exit from safe mode from that machine. I tried the below procedures, but it did not work -
- Rebooting the machine (it goes into safe mode with networking again)
- Trying to edit the boot.ini file (c$ or admin$ is not accessible either. Have tried the 'Invoke-Command' cmdlet and 'PSExec')
- Trying to access registry settings (disallowed)
- Trying to enable the 'Remote Desktop Services' and 'Server' services by remotely connecting to the services console.
- Restoring it from backup (since it is a Physical machine, I would have to be present onsite to restore it)
- Tried PSSession, but PSRemoting is disabled, unable to start Windows Management Service either.
The methods tried by me did not work. I assume I have to go onsite to exit from safe mode. Is there any other way to exit the machine from safe mode?
If you are able to restart computer using
Restart-Computer
PowerShell command, this means that you have WMI access to it (Restart-Computer
works via WMI).This means that you should also be able to use
Invoke-WmiMethod
command to run any command on the remote computer. For example, you could usebcdedit
to modify startup configuration.Try this first to make sure you can do it:
The
ReturnValue
property is populated with a 0 if the command is completed successfully.Sadly, this method does not provide access to command output (StdOut).
If the test is successful, then you can try using
bcdedit /deletevalue {default} safeboot
command to remove SafeBoot flag and restart the computer again. Please consider your risks and test the command before running it.