File tree Expand file tree Collapse file tree 4 files changed +16
-10
lines changed
5.1/Microsoft.PowerShell.Utility
7.2/Microsoft.PowerShell.Utility
7.4/Microsoft.PowerShell.Utility
7.5/Microsoft.PowerShell.Utility Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ the variable named `$Events`.
180180
181181The ` $Events ` variable is sent down the pipeline to the ` Select-String ` cmdlet. ` Select-String ` uses
182182the ** InputObject** parameter. The ` $_ ` variable represents the current object and ` message ` is a
183- property of the event. The ** Pattern** parameter species the string ** Failed** and searches for
183+ property of the event. The ** Pattern** parameter specifies the string ** Failed** and searches for
184184matches in ` $_.message ` . ` Select-String ` displays the output in the PowerShell console.
185185
186186### Example 6: Find a string in subdirectories
Original file line number Diff line number Diff line change @@ -192,7 +192,8 @@ in the PowerShell console.
192192### Example 5: Search for a string in a Windows event log
193193
194194This example searches for a string in a Windows event log. The variable ` $_ ` represents the current
195- object in the pipeline. For more information, see [ about_Automatic_Variables] ( ../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md ) .
195+ object in the pipeline. For more information, see
196+ [ about_Automatic_Variables] ( ../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md ) .
196197
197198``` powershell
198199$Events = Get-WinEvent -LogName Application -MaxEvents 50
@@ -205,15 +206,16 @@ the variable named `$Events`.
205206
206207The ` $Events ` variable is sent down the pipeline to the ` Select-String ` cmdlet. ` Select-String ` uses
207208the ** InputObject** parameter. The ` $_ ` variable represents the current object and ` message ` is a
208- property of the event. The ** Pattern** parameter species the string ** Failed** and searches for
209+ property of the event. The ** Pattern** parameter specifies the string ** Failed** and searches for
209210matches in ` $_.message ` . ` Select-String ` displays the output in the PowerShell console.
210211
211212### Example 6: Find a string in subdirectories
212213
213214This example searches a directory and all of its subdirectories for a specific text string.
214215
215216``` powershell
216- Get-ChildItem -Path C:\Windows\System32\*.txt -Recurse | Select-String -Pattern 'Microsoft' -CaseSensitive
217+ Get-ChildItem -Path C:\Windows\System32\*.txt -Recurse |
218+ Select-String -Pattern 'Microsoft' -CaseSensitive
217219```
218220
219221` Get-ChildItem ` uses the ** Path** parameter to specify ** C:\Windows\System32\* .txt** . The
Original file line number Diff line number Diff line change @@ -192,7 +192,8 @@ in the PowerShell console.
192192### Example 5: Search for a string in a Windows event log
193193
194194This example searches for a string in a Windows event log. The variable ` $_ ` represents the current
195- object in the pipeline. For more information, see [ about_Automatic_Variables] ( ../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md ) .
195+ object in the pipeline. For more information, see
196+ [ about_Automatic_Variables] ( ../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md ) .
196197
197198``` powershell
198199$Events = Get-WinEvent -LogName Application -MaxEvents 50
@@ -205,15 +206,16 @@ the variable named `$Events`.
205206
206207The ` $Events ` variable is sent down the pipeline to the ` Select-String ` cmdlet. ` Select-String ` uses
207208the ** InputObject** parameter. The ` $_ ` variable represents the current object and ` message ` is a
208- property of the event. The ** Pattern** parameter species the string ** Failed** and searches for
209+ property of the event. The ** Pattern** parameter specifies the string ** Failed** and searches for
209210matches in ` $_.message ` . ` Select-String ` displays the output in the PowerShell console.
210211
211212### Example 6: Find a string in subdirectories
212213
213214This example searches a directory and all of its subdirectories for a specific text string.
214215
215216``` powershell
216- Get-ChildItem -Path C:\Windows\System32\*.txt -Recurse | Select-String -Pattern 'Microsoft' -CaseSensitive
217+ Get-ChildItem -Path C:\Windows\System32\*.txt -Recurse |
218+ Select-String -Pattern 'Microsoft' -CaseSensitive
217219```
218220
219221` Get-ChildItem ` uses the ** Path** parameter to specify ** C:\Windows\System32\* .txt** . The
Original file line number Diff line number Diff line change @@ -192,7 +192,8 @@ in the PowerShell console.
192192### Example 5: Search for a string in a Windows event log
193193
194194This example searches for a string in a Windows event log. The variable ` $_ ` represents the current
195- object in the pipeline. For more information, see [ about_Automatic_Variables] ( ../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md ) .
195+ object in the pipeline. For more information, see
196+ [ about_Automatic_Variables] ( ../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md ) .
196197
197198``` powershell
198199$Events = Get-WinEvent -LogName Application -MaxEvents 50
@@ -205,15 +206,16 @@ the variable named `$Events`.
205206
206207The ` $Events ` variable is sent down the pipeline to the ` Select-String ` cmdlet. ` Select-String ` uses
207208the ** InputObject** parameter. The ` $_ ` variable represents the current object and ` message ` is a
208- property of the event. The ** Pattern** parameter species the string ** Failed** and searches for
209+ property of the event. The ** Pattern** parameter specifies the string ** Failed** and searches for
209210matches in ` $_.message ` . ` Select-String ` displays the output in the PowerShell console.
210211
211212### Example 6: Find a string in subdirectories
212213
213214This example searches a directory and all of its subdirectories for a specific text string.
214215
215216``` powershell
216- Get-ChildItem -Path C:\Windows\System32\*.txt -Recurse | Select-String -Pattern 'Microsoft' -CaseSensitive
217+ Get-ChildItem -Path C:\Windows\System32\*.txt -Recurse |
218+ Select-String -Pattern 'Microsoft' -CaseSensitive
217219```
218220
219221` Get-ChildItem ` uses the ** Path** parameter to specify ** C:\Windows\System32\* .txt** . The
You can’t perform that action at this time.
0 commit comments