Hello everyone, I am a beginner with this tool. And now I’m stuck on something that seems very simple.
I’m trying to deploy Docker-Desktop but once installed, I need to add an AD group to the local “docker-users” group. So I use the “Post-Installation” section in the script to execute the command:
Is there a reason you are using Execute-ProcessAsUser? Adding a member to a local group requires elevated privileges so your User would need to be a local Administrator on their device for this to (potentially) work. If your goal is simply to add users to the local group then simply use Add-LocalGroupMember directly in your script eg.
One other thing, you don’t have to use the different script sections (pre-installation, installation, post-installation). It makes the log files look a little nicer but they don’t make any practical difference to how your script runs so feel free to put everything in the installation section.