Hi I'm able to run the script by querying the default administrator user while deploying the scripts.
you can close this ticket
Changing Desktop Wallpaper Programmatically After VM Deployment on Azure
Akshay Mane
5
Reputation points
I'm using the Azure Custom Script Extension to run a PowerShell script remotely for VM creation, and it uses a workgroup/system user account for executing the script. The goal is to change the desktop background of the VM after the deployment is completed.
Here are the steps I've taken so far:
- Ran a PowerShell script through the Azure Custom Script Extension to change the desktop background, but it didn't work.
- I attempted to use a scheduled task to change the desktop wallpaper, creating the task with a PowerShell script. My observations are as follows:
- When running the task with the NT Authority user, it is unable to change the desktop background.
- When running the task with an admin user, it shows the error "no mapping between user ID found."
- I created a task with the NT Authority user that registers another task (to change the wallpaper) using an admin user and set it to trigger at admin login, but it did not work when checked manually.
- I also tried running the wallpaper change script second through the Custom Script Extension after the first custom script extension completed, but it still did not recognize the admin user.
I'm looking for a workaround or alternative approach to set the desktop wallpaper after the deployment is complete.
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,013 questions
Windows for business Windows Server User experience PowerShell
1 answer
Sort by: Most helpful
-
Akshay Mane 5 Reputation points
2024-12-12T05:20:26.27+00:00