Enable-ComputerRestore
Enables the System Restore feature on the specified file system drive.
구문
Default (기본값)
Enable-ComputerRestore
[-Drive] <String[]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Enable-ComputerRestore
cmdlet turns on the System Restore feature on one or more file system
drives. As a result, you can use tools, such as the Restore-Computer cmdlet, to restore the computer
to a previous state.
By default, System Restore is enabled on all eligible drives, but you can disable it, such as by
using the Disable-ComputerRestore
cmdlet. To enable (or re-enable) System Restore on any drive, it
must be enabled on the system drive, either first or concurrently. 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.
예제
Example 1: Enable System Restore on the specified drive
Enable-ComputerRestore -Drive "C:\"
This command enables System Restore on the C: drive of the local computer.
Example 2: Enable System Restore on multiple drives
Enable-ComputerRestore -Drive "C:\", "D:\"
This command enables System Restore on the C: and D: drives of the local computer.
매개 변수
-Confirm
Prompts you for confirmation before running the cmdlet.
매개 변수 속성
형식: | SwitchParameter |
Default value: | False |
와일드카드 지원: | False |
DontShow: | False |
별칭: | cf |
매개 변수 집합
(All)
Position: | Named |
필수: | False |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | False |
나머지 인수의 값: | False |
-Drive
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 enable System Restore on a remote network drive, even if the drive is mapped to the local computer, and you cannot enable System Restore on drives that are not eligible for System Restore, such as external drives.
To enable System Restore on any drive, System Restore must be enabled on the system drive, either before or concurrently.
매개 변수 속성
형식: | String[] |
Default value: | None |
와일드카드 지원: | False |
DontShow: | False |
매개 변수 집합
(All)
Position: | 0 |
필수: | True |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | False |
나머지 인수의 값: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
매개 변수 속성
형식: | SwitchParameter |
Default value: | False |
와일드카드 지원: | False |
DontShow: | False |
별칭: | wi |
매개 변수 집합
(All)
Position: | Named |
필수: | False |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | False |
나머지 인수의 값: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
입력
None
You cannot pipe objects 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.