Checkpoint-Computer
Creates a system restore point on the local computer.
语法
Default (默认值)
Checkpoint-Computer
[-Description] <String>
[[-RestorePointType] <String>]
[<CommonParameters>]
说明
The Checkpoint-Computer
cmdlet creates a system restore point on the local computer.
System restore points and the Checkpoint-Computer
cmdlet are supported only on client operating systems, such as Windows 8, Windows 7, Windows Vista, and Windows XP.
Beginning in Windows 8, Checkpoint-Computer
cannot create more than one checkpoint each day.
示例
Example 1: Create a system restore point
Checkpoint-Computer -Description "Install MyApp"
This command creates a system restore point called Install MyApp. It uses the default APPLICATION_INSTALL restore point type.
Example 2: Create a system MODIFY_SETTINGS restore point
Checkpoint-Computer -Description "ChangeNetSettings" -RestorePointType MODIFY_SETTINGS
This command creates a MODIFY_SETTINGS system restore point called "ChangeNetSettings".
参数
-Description
Specifies a descriptive name for the restore point. This parameter is required.
参数属性
类型: | String |
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | 0 |
必需: | True |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-RestorePointType
Specifies the type of restore point. The default is APPLICATION_INSTALL.
The acceptable values for this parameter are:
- APPLICATION_INSTALL
- APPLICATION_UNINSTALL
- DEVICE_DRIVER_INSTALL
- MODIFY_SETTINGS
- CANCELLED_OPERATION
参数属性
类型: | String |
默认值: | None |
接受的值: | APPLICATION_INSTALL, APPLICATION_UNINSTALL, DEVICE_DRIVER_INSTALL, MODIFY_SETTINGS, CANCELLED_OPERATION |
支持通配符: | False |
不显示: | False |
别名: | RPT |
参数集
(All)
Position: | 1 |
必需: | 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 Checkpoint-Computer
.
输出
None
This cmdlet does not generate any output.
备注
This cmdlet uses the CreateRestorePoint method of the SystemRestore class with a BEGIN_SYSTEM_CHANGE event.
Beginning in Windows 8,
Checkpoint-Computer
cannot create more than one system restore point each day. If you try to create a new restore point before the 24-hour period has elapsed, Windows PowerShell generates the following error:"A new system restore point cannot be created because one has already been created within the past 24 hours. Please try again later."