Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.

Commit e47c52a

Browse files
+ PSv2 Compatibility
Fix for unable to index into object of type System.Diagnostic.Process on PSv2.
1 parent b895866 commit e47c52a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Exfiltration/Invoke-CredentialInjection.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3346,7 +3346,7 @@ function Invoke-CredentialInjection
33463346
}
33473347
elseif ($PsCmdlet.ParameterSetName -ieq "ExistingWinLogon")
33483348
{
3349-
$WinLogonProcessId = (Get-Process -Name "winlogon")[0].Id
3349+
$WinLogonProcessId = (Get-Process -Name "winlogon"| Select-Object -first 1).Id
33503350
}
33513351

33523352
#Get a ushort representing the logontype

0 commit comments

Comments
 (0)