Home Dashboard Directory Help
Search

getForest($context) hangs indefinetly when used within a job by 4ndr345


Status: 

Active


1
0
Sign in
to vote
Type: Bug
ID: 807473
Opened: 11/1/2013 10:49:01 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

Using
[System.DirectoryServices.ActiveDirectory.Forest]::getForest($Context)
within a PowerShell job, the job hangs indefinetly. Runs fine when used outside a job.

System details:
Microsoft Windows Server 2003 R2 Enterprise Edition SP2
PowerShell 2.0
Details
Sign in to post a comment.
Posted by Boe Prox on 11/1/2013 at 12:28 PM
This appears to be the same as reported here: https://connect.microsoft.com/PowerShell/feedback/details/499499/adding-a-snapin-add-pssnapin-from-within-a-job-start-job-causes-job-to-hang-indefinitely

Note that this has been fixed in PowerShell V3 as well as Vista and above operating systems.
Posted by 4ndr345 on 11/1/2013 at 11:06 AM
Also reproducible on Windows XP (Professional Version 2002 Service Pack 3).
Sign in to post a workaround.