I am trying to create some relevance to see if a Windows 10 Restore Point exists. Are there any inspectors for Restore Point? There is a powershell command “Get-ComputerRestorePoint” that returns restore points.
Here is what I have so far.
Fixlet to Turn on Recovery
action uses wow64 redirection {not x64 of operating system}
parameter "PowerShellExe"="{ pathname of file ((it as string) of value "Path" of key
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" of native
registry) }"
delete __createfile
delete powershell.ps1
createfile until _end_
Enable-ComputerRestore -Drive "C:\"
_end_
move __createfile powershell.ps1
waithidden "{parameter "PowershellExe"}" -ExecutionPolicy Bypass -File powershell.ps1
Fixlet to Create Restore Point and Leave Status
action uses wow64 redirection {not x64 of operating system}
parameter "PowerShellExe"="{ pathname of file ((it as string) of value "Path" of key
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" of native
registry) }"
delete __createfile
delete powershell.ps1
createfile until _end_
Checkpoint-Computer -Description "ChangeNetSettings" -RestorePointType MODIFY_SETTINGS
Get-ComputerRestorePoint > "c:\Windows\RestorePoint.txt"
_end_
move __createfile powershell.ps1
waithidden "{parameter "PowershellExe"}" -ExecutionPolicy Bypass -File powershell.ps1
Analysis to Report Last Restore Point
if exists file "c:\Windows\RestorePoint.txt" then if number of lines of file "c:\Windows\RestorePoint.txt" > 0
then ((preceding text of first " " of it) of line (maximum of line numbers of lines containing "/" of it) of file
"c:\Windows\RestorePoint.txt") else "NoRestorePoint" else "NoRestorePoint"