Hi Donh! I'm in the same situation with OMV3. I would like now to run you script. As I have understood I have to replace example.com with my domain.local, is this correct? Should I also uncomment lines? This is not clear.... may you help me please? I really need to grant the OMV users by the AD authentication. Thanks a lot.

Please enter the domain you wish to join: UPPER CASE?
TIRUS.LOCAL
Please enter a domain admin login to use:
administrator
kinit: Cannot contact any KDC for realm 'TIRUS.LOCAL' while getting initial credentials
Host is not configured as a member server.
Invalid configuration. Exiting....
Failed to join domain: This operation is only allowed for the PDC of the domain.