Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Exception calling "GetCurrentDomain" with "0" argument(s): "Current security context is not associated with an Active Directory domain or forest. #339

Open
kevinalbarton opened this issue Jan 9, 2020 · 1 comment

Comments

@kevinalbarton
Copy link

Hi,

I am running Powerview.ps1 on a machine which is member of a domain and I have logged with a domain user but unfortunately when I run the Powerview.ps1 with "Invoke-ShareFinder" or any argument who run GetCurrentDomain function it encounter with:

Exception calling "GetCurrentDomain" with "0" argument(s): "Current security context is not associated with an Active
Directory domain or forest."
At line:1 char:1

  •   + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
      + FullyQualifiedErrorId : ActiveDirectoryOperationException
    
    
    

I ran System.DirectoryServices.ActiveDirectory.Domain::GetCurrentDomain() in powershell and encountered the same error.

@pyhoff
Copy link

pyhoff commented Jun 6, 2020

Same issue here, any workaround? Is this due to powershell version?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants