Powershell - Managing System Restore Points in Windows
To support me, you can subscribe to the channel, share and like the videos, disable your ad blocker or make a donation. Thank you!
Hello,
This article describes how to manage system restore points in Windows using Powershell.
Restore points allow you to return to a previous state of your Windows without affecting your documents.
They can be accessed directly from Windows and also from the Windows Recovery Environment.
Some actions are not available from Powershell commands but from the native vssadmin command.
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/vssadmin-resize-shadowstorage
# Enable System RestoreEnable-ComputerRestore -Drive c:
# Define the maximum amount of disk space used by restore points (as a percentage of the volume size)vssadmin resize shadowstorage /for=C: /on=C: /maxsize=5%
# Define the maximum amount of disk space used by restore pointsvssadmin resize shadowstorage /for=C: /on=C: /maxsize=10GB
# Store restore points from volume C: on volume D: with no disk space limitvssadmin resize shadowstorage /For=C: /On=D: /MaxSize=UNBOUNDED
# Display the space used by restore pointsvssadmin list shadowstorage
# Disable system restoreDisable-ComputerRestore -Drive C:
# Create a restore pointCheckpoint-Computer -Description 'Before the tragedy'
# Create a restore point by specifying the type (default APPLICATION_INSTALL)Checkpoint-Computer -Description 'Before the tragedy' -RestorePointType MODIFY_SETTINGS# Available values: APPLICATION_INSTALL, APPLICATION_UNINSTALL, DEVICE_DRIVER_INSTALL, MODIFY_SETTINGS and CANCELLED_OPERATION
# Display restore pointsGet-ComputerRestorePoint
# Restore a restore point, the ID to use is the SequenceNumberRestore-Computer -RestorePoint 2
# Restore the last (most recent) restore pointRestore-Computer -RestorePoint (Get-ComputerRestorePoint)[-1].sequencenumber
#Display the status of the last restore operationGet-ComputerRestorePoint -LastStatus
# Delete all restore pointsvssadmin delete shadows /all
# Delete the oldest restore pointvssadmin Delete Shadows /For=C: /Oldest
# Delete a specific restore pointvssadmin list shadows /for=c:# Retrieve the restore point id in the form {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX}vssadmin delete shadows /Shadow={XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX}
# By default, the system is limited to creating 1 restore point per day# Deactivate the restore point limitationSet-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore' -Name SystemRestorePointCreationFrequency -Type DWORD -Value 0
Related links
Powershell - Managing System Restore Points in Windows
How to manage system restore points in WindowsPowershell - Hyper-V - Managing virtual machine configuration versions
How to update the configuration version of a virtual machine so that it can use the new features available on your new Hyper-VSeveral ways to rename a computer in Windows
A video showing how to rename a computer in WindowsViewing other types of file containing simple text in Windows
It is possible to view other types of file containing simple text, such as .ps1, .psm1, .psd1, .twig, .gcode... in Windows File ExplorerOverview of the different types of application in Windows
Overview of the different types of application in WindowsWindows - Get remote help easily with Quick Assist
Get help easily from a distance with Quick Assist on Windows 10 and 11
Follow me on
Support me
Last content
Powershell - Testing network connectivity and port accessibility
Powershell - Display network connections (equivalent to netstat)
Powershell - Testing name resolution (equivalent to nslookup)
Powershell - View and manage DNS configuration of network interfaces
Powershell - Managing IP configuration of network interfaces
Powershell - Managing the status and configuration of network interfaces
Powershell and the Left Hand Side
Powershell - Managing disks, partitions and volumes