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:
parent
c7985c9bc3
commit
ef81bf9d27
|
|
@ -2233,7 +2233,7 @@ filter Get-NetDomain {
|
|||
}
|
||||
}
|
||||
else {
|
||||
[System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()
|
||||
[System.DirectoryServices.ActiveDirectory.Domain]::GetComputerDomain()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue