My brain is frozen....
How can i call the .get_username() method on the piped $_?
Get-EventLog -LogName security | ? { $_.eventid -eq 627 }
and how can i pipe that username to ADD-content cmdlet?
Thank you
My brain is frozen....
How can i call the .get_username() method on the piped $_?
Get-EventLog -LogName security | ? { $_.eventid -eq 627 }
and how can i pipe that username to ADD-content cmdlet?
Thank you
fixitchris wrote:
> My brain is frozen....
>
> How can i call the .get_username() method on the piped $_?
>
> Get-EventLog -LogName security | ? { $_.eventid -eq 627 }
>
> and how can i pipe that username to ADD-content cmdlet?
> Thank you
Get-EventLog -LogName security | ? { $_.eventid -eq 627 } | % {
$_.get_username() } | add-content ...
?
| Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| get help on methods and properties | William | PowerShell | 3 | 22 Oct 2008 |
| Calling methods on DataContracts | rajigopal | Indigo | 3 | 04 Apr 2008 |
| static methods | Doug | PowerShell | 1 | 05 Dec 2006 |
| Calling base methods BeginProcessing, EndProcessing, ProcessRecord | Joannes Vermorel | PowerShell | 1 | 09 Nov 2006 |
| Output Methods | THG | PowerShell | 6 | 02 Jul 2006 |