[GH-ISSUE #1450] Cannot add registry key with script, elevate to admin issue? #2849

Closed
opened 2026-03-14 05:41:41 +03:00 by kerem · 0 comments
Owner

Originally created by @moose999 on GitHub (Mar 8, 2023).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/1450

I need a PowerShell script to add a registry key.

I am using the New-Item PowerShell command.

I keep geting the error "PermissionDenied"

I have tried checking the box "Run As User (Windows only)" against the script, and the currently logged in user is a local admin on the machine, but this has not changed anything.

When I run the script locally in an elevated PowerShell window, all works as expected, so I think the script is fine.

How can I get a PowerShell script to run as / elevate to admin so that it can add registry keys?

Many thanks!

Originally created by @moose999 on GitHub (Mar 8, 2023). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/1450 I need a PowerShell script to add a registry key. I am using the New-Item PowerShell command. I keep geting the error "PermissionDenied" I have tried checking the box "Run As User (Windows only)" against the script, and the currently logged in user is a local admin on the machine, but this has not changed anything. When I run the script locally in an elevated PowerShell window, all works as expected, so I think the script is fine. How can I get a PowerShell script to run as / elevate to admin so that it can add registry keys? Many thanks!
kerem closed this issue 2026-03-14 05:41:46 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#2849
No description provided.