Here is the short version of the story. When you import the Active Directory PowerShell Modules (Import-module ActiveDirectory) it takes some time to load.
To speed things up run this command first:
$Env:ADPS_LoadDefaultDrive = 0
If you want to know more about it you can read the Blog post below.