aboutsummaryrefslogtreecommitdiff
path: root/Recon
diff options
context:
space:
mode:
authorHarmj0y <will@harmj0y.net>2016-03-07 02:53:30 -0500
committerHarmj0y <will@harmj0y.net>2016-03-07 02:53:30 -0500
commita87453eeca0b6f9c90b4d359d5848270c3ec29f5 (patch)
treecf7a6ab5e3dc75245500b5f98db0792df047de4c /Recon
parentc883dabf7780f5b8b3cc1bea1f9b163983174838 (diff)
downloadPowerSploit-a87453eeca0b6f9c90b4d359d5848270c3ec29f5.tar.gz
PowerSploit-a87453eeca0b6f9c90b4d359d5848270c3ec29f5.zip
DomainOnly tweak
Diffstat (limited to 'Recon')
-rw-r--r--Recon/PowerView.ps19
1 files changed, 4 insertions, 5 deletions
diff --git a/Recon/PowerView.ps1 b/Recon/PowerView.ps1
index e657c5d..d7b6483 100644
--- a/Recon/PowerView.ps1
+++ b/Recon/PowerView.ps1
@@ -11138,12 +11138,11 @@ function Invoke-EnumerateLocalAdmin {
$LocalAdmins = $LocalAdmins | Where-Object { ($TrustGroupsSIDs -contains $_.SID) -or ((-not $_.SID.startsWith($LocalSID)) -and (-not $_.SID.startsWith($DomainSID))) }
}
- if($LocalAdmins -and ($LocalAdmins.Length -ne 0)) {
-
- if($DomainOnly) {
- $LocalAdmins = $LocalAdmins | Where-Object {$_.IsDomain}
- }
+ if($DomainOnly) {
+ $LocalAdmins = $LocalAdmins | Where-Object {$_.IsDomain}
+ }
+ if($LocalAdmins -and ($LocalAdmins.Length -ne 0)) {
# output the results to a csv if specified
if($OutFile) {
$LocalAdmins | Export-PowerViewCSV -OutFile $OutFile