PowerShell with Task Sequence

Hello All, I am struggling with this issue. Hopefully I can get some help. I am trying to rename multiple computer which are domain joined. I complied a powershell script that works fine when I run it with elevated account that has domain access. This script has some form msg box that pop up at client side to interract. For example they can click ok, snooz or cancel the process. I created a task sequence with embedded power shell script and deployed it, I see the task sequence started but does not do anything else. After I read many post over internet, I got this info that task sequence will not work if the powerShell script has any user input option and reboot option, if so how can I get this task working. Any help would be much appreciated.

If you’re locked into using a prompt script…

The problem you’re experiencing is that scheduled tasks are not, normally, interactive. I would separate out the two. The scheduled task is needed to run in a security context that has the rights to rename the computer, but that doesn’t mean the prompt script requires the same.

Maybe create the scheduled task and modify permissions on the scheduled task so that the users you’re expecting to rename the computer have access to schedule it. Then create a logon script that prompts them to rename the computer and run the scheduled task when they choose.

This would run the prompt script in the current user session and allow them to call the scheduled task that runs in the security context needed for the rename.