PowerShellMafia/PowerSploit

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

kevinalbarton opened this issue · 1 comments

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.

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