Disable-ComputerRestore
Disables the System Restore feature on the specified file system drive.
Disable-ComputerRestore
[-Drive] <String[]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
The Disable-ComputerRestore
cmdlet turns off the System Restore feature on one or more file system
drives. As a result, attempts to restore the computer do not affect the specified drive.
To disable System Restore on any drive, it must be disabled on the system drive, either first or concurrently.
To re-enable System Restore, use the Enable-ComputerRestore cmdlet. To find the state of System
Restore for each drive, use Rstrui.exe
.
System restore points and the ComputerRestore cmdlets are supported only on client operating systems, such as Windows 7, Windows Vista, and Windows XP.
Disable-ComputerRestore -Drive "C:\"
This command disables System Restore on the C: drive.
Disable-ComputerRestore "C:\", "D:\"
This command disables System Restore on the C: and D: drives. The command uses the Drive parameter, but it omits the Drive parameter name.
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the file system drives. Enter one or more file system drive letters, each followed by a colon and a backslash and enclosed in quotation marks, such as C:\ or D:. This parameter is required.
You cannot use this cmdlet to disable System Restore on a remote network drive, even if the drive is mapped to the local computer, and you cannot disable System Restore on drives that are not eligible for System Restore, such as external drives.
To disable System Restore on any drive, System Restore must be disabled on the system drive, either before or concurrently.
Type: | String[] |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
None
You cannot pipe input to this cmdlet.
None
This cmdlet does not generate any output.
To run this cmdlet on Windows Vista and later versions of Windows, open Windows PowerShell with the Run as administrator option.
To find the file system drives that are eligible for system restore, in System in Control Panel, see the System Protection tab. To open this tab in Windows PowerShell, type
SystemPropertiesProtection
.This cmdlet uses the Windows Management Instrumentation (WMI) SystemRestore class.
PowerShell feedback
PowerShell is an open source project. Select a link to provide feedback: