Disallowing “Password never expires” option on AD accounts while creating new mailboxes

Can the option “Password never expires” somehow be disallowed on AD accounts while creating new mailboxes?
 
If you want that HC should not set “Password never expires” option on AD accounts while creating new mailboxes and that they should expire with group policy, follow the below steps:
 
  1. Open SQL Management Studio and take the backup of “HC10” database.
  2. Open tblServers table and get the ServerID of Exchange server.
  3. Execute the query Select * from tblServerRoles where ServerID = “value for ServerID”  (where  ServerID is the ID noted in step 2).
  4. In the “ConfigurationXML” column, click to show the XML editor and copy entire text of “ConfigurationXML”.


     
  5. There is a node <DontSetPasswordToNeverExpire>true</DontSetPasswordToNeverExpire> in the text of “ConfigurationXML”. If this node doesn’t exist, you may simply copy the node and specify it in your ConfigurationXML. Please set node value to “true” and then update the ConfigurationXML, by executing the query:
            
        UPDATE [dbo].[tblServerRoles]
        SET [ConfigurationXML] = '<ExchangeServerRole>
       <SelectedExchangeServerType>exchange2016</SelectedExchangeServerType>
       <ActAsBackupServerOnly>false</ActAsBackupServerOnly>
       <SrvRecordEnabled>false</SrvRecordEnabled>
       <ClientAccessServer>192.168.1.12</ClientAccessServer>
       <OwaAccessUrl>https://192.168.1.12/OWA</OwaAccessUrl>
       <DomainController>labad16.ad16.com</DomainController>
       <RootOu>OU=Hosting,DC=ad16,DC=com</RootOu>
       <HostName>192.168.1.12</HostName>
       <AdministratorLogin>ad16\exg13</AdministratorLogin>
       <AdministratorPassword>EwRJFUdBtY8RE9NvlRd9og==</AdministratorPassword>
       <DatabaseSelectionMode>Manual</DatabaseSelectionMode>
       <DomainAdministrator>ad16\exg13</DomainAdministrator>
       <DomainPassword>EwRJFUdBtY8RE9NvlRd9og==</DomainPassword>
       <IsSharedNetworkEnabled>false</IsSharedNetworkEnabled>
       <SharedNetworkPathPassword>ok</SharedNetworkPathPassword>
       <DontSetPasswordToNeverExpire>true</DontSetPasswordToNeverExpire>
       </ExchangeServerRole>'
          Where ServerRoleID = 1 --(Use your ServerRoleID.)

Note: Specify your ConfigurationXML text in single quotes.