From 3049211f533b006a08ec6bfca74e498b20a03a05 Mon Sep 17 00:00:00 2001 From: Harmj0y Date: Fri, 24 Jun 2016 16:11:20 -0400 Subject: Fixed Find-LocalAdminAccess to properly check for the object output from Invoke-CheckLocalAdminAccess...whoops --- Recon/PowerView.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Recon/PowerView.ps1') diff --git a/Recon/PowerView.ps1 b/Recon/PowerView.ps1 index 0125ed8..5a187e7 100755 --- a/Recon/PowerView.ps1 +++ b/Recon/PowerView.ps1 @@ -8543,7 +8543,7 @@ filter Get-SiteName { .EXAMPLE - PS C:\> Get-NetComputer | Invoke-CheckLocalAdminAccess + PS C:\> Get-NetComputer | Get-SiteName Returns the sites for every machine in AD. #> @@ -9844,7 +9844,7 @@ function Invoke-UserHunter { # see if we're checking to see if we have local admin access on this machine if ($CheckAccess) { $Admin = Invoke-CheckLocalAdminAccess -ComputerName $CName - $FoundUser | Add-Member Noteproperty 'LocalAdmin' $Admin + $FoundUser | Add-Member Noteproperty 'LocalAdmin' $Admin.IsAdmin } else { $FoundUser | Add-Member Noteproperty 'LocalAdmin' $Null @@ -9891,7 +9891,7 @@ function Invoke-UserHunter { # see if we're checking to see if we have local admin access on this machine if ($CheckAccess) { $Admin = Invoke-CheckLocalAdminAccess -ComputerName $ComputerName - $FoundUser | Add-Member Noteproperty 'LocalAdmin' $Admin + $FoundUser | Add-Member Noteproperty 'LocalAdmin' $Admin.IsAdmin } else { $FoundUser | Add-Member Noteproperty 'LocalAdmin' $Null @@ -11743,7 +11743,7 @@ function Find-LocalAdminAccess { if($Up) { # check if the current user has local admin access to this server $Access = Invoke-CheckLocalAdminAccess -ComputerName $ComputerName - if ($Access) { + if ($Access.IsAdmin) { $ComputerName } } -- cgit v1.2.3