![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Calling Methods on ? pipes 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 System Specs![]() |
| | #2 (permalink) |
| | Re: Calling Methods on ? pipes 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 ... ? |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| get help on methods and properties | PowerShell | |||
| static methods | PowerShell | |||
| Calling base methods BeginProcessing, EndProcessing, ProcessRecord | PowerShell | |||
| Output Methods | PowerShell | |||