Replacing calls to the ActiveDirectory module will allow this module to be run in PowerShell 6, and on Linux.