Disable-ComputerRestore

Disable System Restore on a specified file system drive. This cmdlet was removed from PowerShell in version 6.

Syntax
 Disable-ComputerRestore [-Drive] string[]
 [-Confirm] [-WhatIf] [CommonParameters ]
Key
 -drive string
 The file system drive, one or more drive letters, each followed by :\ and
 enclosed in quotation marks, such as "C:\" or "D:\"
 -confirm
 Prompt for confirmation before executing the command.
 -whatIf
 Describe what would happen if you executed the command without actually
 executing the command.

You cannot use Disable-ComputerRestore 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.

Examples

Disable System Restore on the C: drive:

PS C:> Disable-ComputerRestore -drive "C:\"

Disable System Restore on the C: and D: drives:

PS C:> Disable-ComputerRestore"C:\", "D:\"

"Don’t simply retire from something; have something to retire to" ~ Harry Emerson Fosdick

Related PowerShell Cmdlets

Enable-ComputerRestore - Enable System Restore on a drive.

(追記) (追記ここまで)
Copyright © 1999-2026 SS64.com
Some rights reserved

AltStyle によって変換されたページ (->オリジナル) /