PowerShellMafia / PowerSploit

PowerSploit - A PowerShell Post-Exploitation Framework
Other
11.68k stars 4.59k forks source link

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

Open kevinalbarton opened 4 years ago

kevinalbarton commented 4 years ago

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

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

pyhoff commented 4 years ago

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