r/PowerShell • u/o-Festive-Mambo • Jun 17 '26
Solved Keept getting SetAccessControl error even though my account is administrator on all side
Be forgiving with me because i'm not very technical with this, but I've tried using script to tweak some videogame files, used to work fine but the newer version cannot run its function. everytime i tried to run it the error line below always shows up.
" Exception calling "SetAccessControl" with "1" argument(s): "Attempted to perform an unauthorized operation."
I always started my powershell in admin, and I run this file through a PS.1 extension, any idea on how to fix it? link to the program.
0
Upvotes
View all comments
Show parent comment
1
u/BlackV Jun 17 '26 edited Jun 17 '26
Ah fair enough
Your best way through is probably run this in debugging and step through it line by line, confirm the steps and failures
Good luck
Edit' oh I see what you're saying you've now taken ownership and it works