chaoticz 0 Posted February 16 Share Posted February 16 I'm trying to change the desktop background on clients through a client task - executing a command (I don't have AD). I have already tried both CMD and adding to the registry, and through POWERSHELL and nothing comes out, despite the fact that if you do all this locally on a PC, then everything works, but it doesn’t work through the client task Maybe someone did something like that .. Help Please Link to comment Share on other sites More sharing options...
Administrators Marcos 4,919 Posted February 16 Administrators Share Posted February 16 A Run command task is executed in the system account which is probably the reason why it doesn't work. Link to comment Share on other sites More sharing options...
chaoticz 0 Posted February 16 Author Share Posted February 16 1 hour ago, Marcos said: A Run command task is executed in the system account which is probably the reason why it doesn't work. The task does not require administrator rights, but I already tried elevating privileges like (powershell.exe "C:\temp\wall.ps1 " -Verb runAs) and so (powershell Get-Content c:\temp\wall.ps1 | PowerShell.exe - noprofile -executionpolicy bypass) , files and script are loaded but not executed. Link to comment Share on other sites More sharing options...
Administrators Marcos 4,919 Posted February 16 Administrators Share Posted February 16 You can test it locally using psexec (psexec /s powershell ...). Link to comment Share on other sites More sharing options...
chaoticz 0 Posted February 16 Author Share Posted February 16 2 minutes ago, Marcos said: You can test it locally using psexec (psexec /s powershell ...). yes, I immediately checked it, locally everything works as intended, but it does not work through the task to the end. Link to comment Share on other sites More sharing options...
kapela86 10 Posted February 28 Share Posted February 28 Marcon explained in his first answer, but you didn't understand it. Whatever you run using "Run command task" it is executed using "SYSTEM" account, so if you specify there in reg command to edit HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper, then it is acually changing "HKEY_USERS\S-1-5-18\Control Panel\Desktop\Wallpaper". A proper way to change it is using Group Policy in Active Directory (your windows computers need to have Pro edition and connected to that active directory) Link to comment Share on other sites More sharing options...
Recommended Posts