answered 2021-11-28 14:58:08 +0200
I think your code is wrong. please try this in your userdata:
#ps1_sysnative
Start-Transcript -path "C:\temp\cloudbase-init-firstboot.log" -Append -force Import-Module Activedirectory