Update PowerView.ps1

GetCurrentUserDomain encounter with:
Exception calling "GetCurrentUserDomain" with "0" argument(s): "Current security context is not associated with an Active
Directory domain or forest."
At line:1 char:1
+ [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ActiveDirectoryOperationException

In updated windows and .Net framework now but when changing to GetcomputerDomain while we have logged in with a domain user the problem will be resolved.
This commit is contained in:
kevinalbarton 2020-01-09 23:14:25 +03:30 committed by GitHub
parent c7985c9bc3
commit ef81bf9d27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2233,7 +2233,7 @@ filter Get-NetDomain {
}
}
else {
[System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()
[System.DirectoryServices.ActiveDirectory.Domain]::GetComputerDomain()
}
}