We have an RDS server with dozens of user profiles and I am trying to run cleanup scripts to get rid of some old software folders from the users C:\users*username\appdata\local\softwarenamedfolder However I get access denied errors when trying to run my script When I try to browse to said folders it gives me a popup saying I have no permissions click continue to get them
I tried running the following in powershell
icacls "C:\users" /grant "Domain Admins":F /t
and now it no longer pops up when clicking the username in C:\users, however the appdata folders for each user still do not have the permission set
What can I use to iterate through EVERY SINGLE FOLDER in C:\users and add the domain admins group will full control?