PowerShell Logo Small

Restore-Computer



This is the built-in help made by Microsoft for the command 'Restore-Computer', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Starts a system restore on the local computer.

SYNTAX


Restore-Computer [-RestorePoint] <Int32> [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Restore-Computer cmdlet restores the local computer to the specified system restore point.


A Restore-Computer command restarts the computer. The restore is completed during the restart operation.


System restore points and the Restore-Computer cmdlet are supported only on client operating systems, such as Windows 7, Windows Vista, and
Windows XP.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=135254
Checkpoint-Computer
Disable-ComputerRestore
Enable-ComputerRestore
Get-ComputerRestorePoint
Restart-Computer

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

PS C:\>restore-computer -RestorePoint 253



This command restores the local computer to the restore point with sequence number 253.

Because the RestorePoint parameter is positional, you can omit the parameter name.








-------------------------- EXAMPLE 2 --------------------------

PS C:\>restore-computer 255 -confirm
Confirm
Are you sure you want to perform this action?
Performing operation "Restore-Computer" .
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):



This command restores the local computer to the restore point with sequence number 255. It uses the Confirm parameter to prompt the user
before actually performing the operation.








-------------------------- EXAMPLE 3 --------------------------

PS C:\>Get-ComputerRestorePoint
PS C:\>Restore-Computer -RestorePoint 255
PS C:\>Get-ComputerRestorePoint -LastStatus



These commands run a system restore and then check its status.

The first command uses the Get-ComputerRestorePoint cmdlet to get the restore points on the local computer.

The second command uses Restore-Computer to restore the computer to the restore point with sequence number 255.

The third command uses the LastStatus parameter of Get-ComputerRestorePoint cmdlet to check the status of the restore operation. Because the
Restore-Computer command forces a restart, this command would be entered when the computer restarted.