Disable System Restore on a specified file system drive.
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. CommonParameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer -OutVariable.
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