locked
Import-Module ActiveDirectory timing out RRS feed

  • Question

  • I have a script that I run to setup user accounts in Active Directory.  Up until a few weeks ago, it worked fine. Now, it seems to fail about 99% of the time when importing the AD module, first line in the script.

    Basically, it's just hanging and timing out.  I've tried it on a couple of other machines and it works on one and not the other.  I've confirmed with my sys engineers that there's been no changes to the DC's and there's been no network changes either.  The sys engineers are also able to import and connect to the DC's just fine.

    I'm running Windows 8.1 Pro with PowerShell 5.  I've already tried uninstalling and reinstalling both PowerShell and RSAT with no luck.

    Here is the error message I get:

    import-module : The operation returned because the timeout limit was exceeded.
    At {{SCRIPT LOCATION}}.ps1:1 char:1
    + import-module ActiveDirectory
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [Import-Module], TimeoutException
        + FullyQualifiedErrorId : NewDriveProviderException,Microsoft.PowerShell.Commands.ImportModuleCommand

    Any assistance on this would be immensely appreciated.

    Friday, December 4, 2015 9:37 PM

Answers

  • If it was me, I'd start by checking the ADWS service on your Domain Controllers.

    Get-Service -ComputerName 'Dc01','Dc02','Dc03' -Name ADWS | Select-Object MachineName,Status,Name,DisplayName

    • Proposed as answer by jrv Friday, December 4, 2015 10:27 PM
    • Marked as answer by Elaine Jing Tuesday, December 8, 2015 2:54 AM
    Friday, December 4, 2015 10:00 PM

All replies

  • If it was me, I'd start by checking the ADWS service on your Domain Controllers.

    Get-Service -ComputerName 'Dc01','Dc02','Dc03' -Name ADWS | Select-Object MachineName,Status,Name,DisplayName

    • Proposed as answer by jrv Friday, December 4, 2015 10:27 PM
    • Marked as answer by Elaine Jing Tuesday, December 8, 2015 2:54 AM
    Friday, December 4, 2015 10:00 PM
  • I have a script that I run to setup user accounts in Active Directory.  Up until a few weeks ago, it worked fine. Now, it seems to fail about 99% of the time when importing the AD module, first line in the script.

    Basically, it's just hanging and timing out.  I've tried it on a couple of other machines and it works on one and not the other.  I've confirmed with my sys engineers that there's been no changes to the DC's and there's been no network changes either.  The sys engineers are also able to import and connect to the DC's just fine.

    I'm running Windows 8.1 Pro with PowerShell 5.  I've already tried uninstalling and reinstalling both PowerShell and RSAT with no luck.

    Here is the error message I get:

    import-module : The operation returned because the timeout limit was exceeded.
    At {{SCRIPT LOCATION}}.ps1:1 char:1
    + import-module ActiveDirectory
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [Import-Module], TimeoutException
        + FullyQualifiedErrorId : NewDriveProviderException,Microsoft.PowerShell.Commands.ImportModuleCommand

    Any assistance on this would be immensely appreciated.

    Import-Module has little to do with AD.  The timeout is due to lack of communication with any AD web service.

    See: https://technet.microsoft.com/en-us/library/dd723680%28v=ws.10%29.aspx?f=255&MSPPError=-2147217396


    \_(ツ)_/

    Friday, December 4, 2015 10:27 PM