Score:0

Exit safe mode remotely

kz flag

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 -

  1. Rebooting the machine (it goes into safe mode with networking again)
  2. Trying to edit the boot.ini file (c$ or admin$ is not accessible either. Have tried the 'Invoke-Command' cmdlet and 'PSExec')
  3. Trying to access registry settings (disallowed)
  4. Trying to enable the 'Remote Desktop Services' and 'Server' services by remotely connecting to the services console.
  5. Restoring it from backup (since it is a Physical machine, I would have to be present onsite to restore it)
  6. 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?

Massimo avatar
ng flag
How did you boot into Safe Mode in the first place?
kz flag
@Massimo I was able to RDP the machine in normal mode.
Massimo avatar
ng flag
Ok, but then how did you tell it to reboot into Safe Mode, exactly?
kz flag
@Massimo From MSConfig.
Massimo avatar
ng flag
Have you tried using msconfig again to select normal boot?
kz flag
@Massimo I cannot RDP into the machine anymore, since it is in Safe Mode. Neither can I start the services for 'Remote Desktop Services'. The machine resides on a remote location.
Massimo avatar
ng flag
Ok, that was not really clear from the question, better to state it explicitly.
kz flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/133748/discussion-between-abhishek-ray-and-massimo).
Score:1
us flag

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 use bcdedit to modify startup configuration.

Try this first to make sure you can do it:

Invoke-WmiMethod –ComputerName $ComputerName -Class 'Win32_Process' -Name 'create' -ArgumentList 'bcdedit /enum'

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.