Why dosen't the Windows Powershell function work?

I am programming a Digispark to execute a PowerShell function to change the user's background to a mylittlepony picture, the Digispark is doing everything correctly but the function isn't doing anything.

Edit: Sometimes it works sometimes not.

Does anyone know why?

Code: https://pastebin.com/RrviiVUN // This is me running all the commands in proper order, the background of my PC remains unchanged.
PC Specs: https://pastebin.com/3j4PdPcx

Screenshot (72).png
This is a screenshot I took, the "Background Unchanged" text was added in paint.
 
Last edited:
Back