Make sure it's working the way you want. And compare the result logs and running the diskpart commands manually (as some diskpart.exe version did have a bug and it didn't worked correctly using diskpart /script option).

Alternatives but not as good to get LUNs configuration: wmic partition list /format:htable >disk.htmlwmic logicaldisk list /format:htable >logicaldisk.html