Gajus - Fotolia

Q
Manage Learn to apply best practices and optimize your operations.

What's the best way to reformat a hard drive remotely?

Whether you need to remotely reformat a hard drive for security or prepare new network-attached machines, a few utilities can make the job easier.

There are a number of ways to remotely format a hard disk. Some products are security-related and are designed to perform a remote wipe of the hard drive on a computer that has been lost or stolen. Other utilities are geared more toward bare-metal deployments and can be used to prepare the hard disk and deploy an operating system to a brand-new computer that is attached to the network.

If the goal is to simply format a hard drive on a remote computer, then the easiest way of doing so might be to use Windows PowerShell. PowerShell can be used to run commands against a remote system. The first thing that you'll have to do, however, is to enable PowerShell remoting. You can accomplish this by entering the following command: Enable-PSRemoting –Force

What you will have to do next depends on whether the computers are on an Active Directory domain. If the computers are not participating on the Active Directory, configure the Windows Remote Management (WinRM) service to trust other computers. To trust every computer on the network, enter these commands (you don't have to do this for domain members):

Set-Item wsman:\localhost\client\trustedhosts *

Restart-Service WinRM

Now you should be able to establish a remote session with the computer in question. There are a number of ways of doing this, but I prefer the Enter-PSSession command:

Enter-PSSession –ComputerName <the name of the remote computer>

Depending on how the computers are set up, you may have to append the –Credential switch and a username to log into the remote system.

Once the session has been established, you can format a hard drive on the remote computer by entering the following command:

Format-Volume –DriveLetter <the drive letter that you want to use>

Next Steps

Desktop management options grow to include VDI and the cloud

Consider these third-party Windows desktop management utilities

Use Windows PowerShell to instantly install WSUS updates

PowerShell should be part of any IT admin's toolbox

Can I specify users with Remote Desktop permissions through Group Policy?

This was last published in January 2015

Dig Deeper on Microsoft Windows 8 operating system

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Join the conversation

4 comments

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

What's your preferred method for remotely reformatting a hard drive?
Cancel
I would choose Windows Powershell anytime as my preferred method. With Powershell Remoting, it is possible to enable computers in a network to trust each other, such that one user can configure another computer remotely. With the right commands, it is possible to format a remote hard drive. The best part about Powershell is that I do not have to install anything on the two computers since Powershell comes pre installed on Windows.
Cancel
If the drive being reformatted is the boot volume, how would one proceed remotely after formatting?
Cancel
The author replies: If it’s a boot volume, then you could use System Center to perform bare-metal provisioning, as long as the physical computer has boot from LAN capabilities.
Cancel

-ADS BY GOOGLE

SearchVirtualDesktop

SearchWindowsServer

SearchExchange

Close