I am using Windows Server 2012 R2 (AD, DC). 20 computers are joined with DC (Users are on Win 10 OS). I want to disable desktop file saving through group policy, and in this regard, I tried following it worked for users but denies administrator. (I don't want to redirect to network share)
I created a script and added in Log On:
Echo Y| %userprofile%\desktop /g %username%:r
It worked but when I right click on desktop then new->folder, it asks for the administrator login. When I enter administrator user and password, it denies.
I have also tried following but it did not work also: Only working for users, not admin:
IF "%username" == "administrator" ( Echo Y| cacls %userprofile%\desktop /P %username%:W ) ELSE ( Echo Y| cacls %userprofile%\desktop /P %username%:R )