Question I'm getting "Access Denied" errors ?

Jun 27, 2023
1
0
10
I am trying to setup automatic restore points in task scheduler using PowerShell. Everything that I have read shows that typing PowerShell into the run line and this script into the arguments line should create a restore point. However, I am trying to test the script before setting it up by typing this into PowerShell
Checkpoint-Computer -Description "TWC-RestorePoint" -RestorePointType MODIFY_SETTINGS

This is the error message that I get:

Checkpoint-Computer : Access denied
At line:1 char:1
+ Checkpoint-Computer -Description "TWC-RestorePoint" -RestorePointType ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: :)) [Checkpoint-Computer], ManagementException
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.CheckpointComputerCommand

Any ideas about why I'm getting this error? Any help would be greatly appreciated.