Skip to content

Instantly share code, notes, and snippets.

@hidsh
Created July 8, 2022 02:52
Show Gist options
  • Save hidsh/d85e92be4c8db2c94cf968f2fcee1ae4 to your computer and use it in GitHub Desktop.
Save hidsh/d85e92be4c8db2c94cf968f2fcee1ae4 to your computer and use it in GitHub Desktop.
コマンドライン(powershell)で Windows 10 の復元ポイントを作成
# コマンドライン(powershell)で Windows 10 の復元ポイントを作成
#
$comment = Read-Host "コメント"
if([string]::IsNullOrEmpty($comment)) {
$comment = "変更"
}
#Write-Output $comment
try {
Checkpoint-Computer -Description $comment -ErrorAction Stop
}
catch [System.Management.ManagementException] {
Write-Output $_.Exception
}
finally {
# 開いたままにする
$host.UI.RawUI.ReadKey()
}
@hidsh
Copy link
Author

hidsh commented Jul 8, 2022

動いてないっぽい

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment