Hello,
I have created another KB Article which has PowerShell Script Sample for your reference as asked.
Sample PowerShell Script for Creating Home Directory in AD - Identity Security Cloud (ISC) / ISC Community Knowledge Base - SailPoint Developer Community