File tree Expand file tree Collapse file tree
5.1/Microsoft.PowerShell.Utility
7.4/Microsoft.PowerShell.Utility
7.5/Microsoft.PowerShell.Utility
7.6/Microsoft.PowerShell.Utility Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ Action :
160160
161161function CheckLog {
162162>> Get-EventLog -Log Application |
163- >> where {($_.Source -like "TestApp") -and ($_.Message -like "*failed*")}
163+ >> Where-Object {($_.Source -like "TestApp") -and ($_.Message -like "*failed*")}
164164>>}
165165>>
166166PS> Checklog
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ Action :
161161
162162function CheckLog {
163163>> Get-EventLog -Log Application |
164- >> where {($_.Source -like "TestApp") -and ($_.Message -like "*failed*")}
164+ >> Where-Object {($_.Source -like "TestApp") -and ($_.Message -like "*failed*")}
165165>>}
166166>>
167167PS> Checklog
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ Action :
161161
162162function CheckLog {
163163>> Get-EventLog -Log Application |
164- >> where {($_.Source -like "TestApp") -and ($_.Message -like "*failed*")}
164+ >> Where-Object {($_.Source -like "TestApp") -and ($_.Message -like "*failed*")}
165165>>}
166166>>
167167PS> CheckLog
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ Action :
161161
162162function CheckLog {
163163>> Get-EventLog -Log Application |
164- >> where {($_.Source -like "TestApp") -and ($_.Message -like "*failed*")}
164+ >> Where-Object {($_.Source -like "TestApp") -and ($_.Message -like "*failed*")}
165165>>}
166166>>
167167PS> CheckLog
You can’t perform that action at this time.
0 commit comments