Question Can't create system restore point in powershell with non admin credentials on Windows 10 machines

Feb 13, 2019
1
0
10
0
When I run the following ps1 file, I get access denied.
sysrestore.ps1
Enable-ComputerRestore -drive "c:\"
Checkpoint-Computer -description "Test SystemPoint" -restorepointtype "Modify_Settings"

I've added this to the top of the script and it works, except I get 24 restore points created instead of 1. It would create more but I had to close all those pop up windows.
Start-Process powershell.exe -Verb RunAs -ArgumentList ('-noprofile -noexit -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition))

The only way I can get this to work is to log in as a domain admin, run powershell ISE as an administrator, then load the ps1 into powershell and run from there. This is not acceptable.

My users cannot be local admins on the machines.
Any thoughts?

Mike
 

hang-the-9

Titan
Moderator

Similar threads


ASK THE COMMUNITY