From e47c52a090b6b590e6632eecf705bf566f3c74af Mon Sep 17 00:00:00 2001 From: b33f Date: Mon, 17 Jul 2017 21:32:22 +0100 Subject: + PSv2 Compatibility Fix for unable to index into object of type System.Diagnostic.Process on PSv2. --- Exfiltration/Invoke-CredentialInjection.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Exfiltration/Invoke-CredentialInjection.ps1 b/Exfiltration/Invoke-CredentialInjection.ps1 index 818e551..b025328 100644 --- a/Exfiltration/Invoke-CredentialInjection.ps1 +++ b/Exfiltration/Invoke-CredentialInjection.ps1 @@ -3346,7 +3346,7 @@ function Invoke-CredentialInjection } elseif ($PsCmdlet.ParameterSetName -ieq "ExistingWinLogon") { - $WinLogonProcessId = (Get-Process -Name "winlogon")[0].Id + $WinLogonProcessId = (Get-Process -Name "winlogon"| Select-Object -first 1).Id } #Get a ushort representing the logontype -- cgit v1.2.3