Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know you can remotely shutdown a Windows machine with the "shutdown" command line. But I think it's impossible to remotely get a machine into safe mode (with networking). Does anyone know of a way to do this?

share|improve this question
up vote 9 down vote accepted

If you have admin rights on the remote machine then it's possible.

You need to edit the boot.ini file (usually found on the root of the C: drive)

Open a command prompt on your local machine



The boot ini file will open which usually looks something like this:

[boot loader]
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional"  
/noexecute=optin /fastdetect

On the end of the last line you need to add


the last line will then read something like

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional"  
/noexecute=optin /fastdetect /safeboot:network

Save the changes and then force a reboot from the command line and it should restart into safe mode with networking. Remember to change the boot.ini file back when you're done!

share|improve this answer
Its also worth mentioning that RDP might not work in safe mode. I haven't tried/tested it myself but I've been told it doesn't work on XP Home. Your mileage may vary. – KPWINC Aug 17 '09 at 16:05
This doesn't work with Vista/7. Using msconfig.exe works in XP, Vista and 7 (and is easier). – mivk May 26 '12 at 7:37

To reboot Windows 7 into safe mode with networking, run msconfig.exe. On the Boot tab, you can select "Safe boot" and there is a checkbox for networking.

I'm not sure if Remote Desktop will run in safe mode. I use TightVNC. To have the TightVNC service start in safe mode, copy it's registry entry to safeboot\network:

REG COPY HKLM\system\CurrentControlSet\services\tvnserver HKLM\system\CurrentControlSet\control\safeboot\network\tvnserver /s /f

Other VNC services can probably be activated in the same way.

share|improve this answer
I have used this many times with vnc. It works great. – johnny Apr 28 '15 at 14:39

Not likely for a workstation machine. You need something that gives you control of the machine itself in order to tell Windows how to boot.

You will have more luck on server hardware as many vendors build in an option to connect to the console remotely.

If you have the option to interactively connect to Windows on the machine, though, you can use MSCONFIG to set the /SAFEBOOT switch in boot.ini, then reboot the machine. Do Start -> Run and type in MSCONFIG, then on the boot.ini tab check /SAFEBOOT under Boot Options and choose which safe mode you want to boot into (in this scenario, NETWORK).

share|improve this answer

LogMeIn has a safemode reboot option.

share|improve this answer

This is exactly what HP's integrated lights-out option is for. Editing the boot.ini file won't be much help, since you won't be able to log into the machine, as the RDP service won't run. In case that's an HP server though you can connect directly to it's console via https portal, and also have access to virtual "power button".

share|improve this answer

That answer above about edit the boot.ini , is nice and all -- can't change the boot.ini file...if you follow "Mark's" directions step by step - you hit a brick wall because the boot.ini is read only.

EDIT: And yes....I tested it signed in as an administrator to.

share|improve this answer
So change it.... Right Click ---> Properties and uncheck "read-Only"... If you're in the remote computer's c$ with administrative rights you should have no problem doing that. – user81808 May 18 '11 at 9:25

If you hastily chose to modify the BOOT.ini to restart in safe mode with networking, and then restart, you will find that you cannot remotely log in at all. You WILL likely be able to view the boot file \\machinename\C$\boot.ini, but won't be able to modify it because it is read only. You will also not be able to "right-click and uncheck 'read-only' " because you won't be able to navigate to the C$ directory at all. I now have to physically login to this virtual workstation in order to change the boot.ini back. I will never make that mistake again!

share|improve this answer
It may feel like a mistake but it could be taken as experience gained, knowhow level up. Next time you will have your failover plans ready? ...and SSH services active, remember WMIC? WMI works perfectly in safe mode, you could for example reboot to normal if there is no activity in safe mode for some period of time. And of course you could use WMI for altering boot process. – Sampo Sarrala Oct 10 '12 at 18:55

What happened to the boot.ini file?

Windows 7 More

In earlier versions of Windows, boot.ini was a system file that contained information about the Windows operating systems installed on a computer. This information was displayed during the startup process when you turned on your computer. It was most useful in multiboot configurations, or for advanced users or administrators who needed to customize how Windows started.

In this version of Windows, the boot.ini file has been replaced with Boot Configuration Data (BCD). This file is more versatile than boot.ini, and it can apply to computer platforms that use means other than basic input/output system (BIOS) to start the computer.

If you need to make changes to BCD, such as removing entries from the list of displayed operating systems, use the command-line tool Bcdedit, an advanced tool intended for administrators and IT professionals. For technical information about Bcdedit, go to the Microsoft website for IT professionals.

If your computer is a multiboot configuration, you can still change which Windows operating system opens by default, and how long to display the list of operating systems, by using System in Control Panel.

  1. Open System by clicking the Start button Picture of the Start button, right-clicking Computer, and then clicking Properties.

2.In the left pane, click Advanced system settings. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

3.Click the Advanced tab, and then, under Startup and Recovery, click Settings.

4.Under System startup, choose a default operating system and the amount of time to display the list of operating systems, click OK, and then click OK again.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.