Created
July 8, 2022 02:52
-
-
Save hidsh/d85e92be4c8db2c94cf968f2fcee1ae4 to your computer and use it in GitHub Desktop.
コマンドライン(powershell)で Windows 10 の復元ポイントを作成
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# コマンドライン(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() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
動いてないっぽい