Skip to content

Commit cecedda

Browse files
committed
Fix typo
1 parent 409f1b6 commit cecedda

4 files changed

Lines changed: 72 additions & 72 deletions

File tree

reference/5.1/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ selected event providers. And, you can combine events from multiple sources in a
7878
`Get-WinEvent` allows you to filter events using XPath queries, structured XML queries, and hash
7979
table queries.
8080

81-
If you're not running PowerShell as an Administrator, you might see error messages that you cannot
81+
If you're not running PowerShell as an Administrator, you might see error messages that you can't
8282
retrieve information about a log.
8383

8484
## EXAMPLES
@@ -160,7 +160,7 @@ try{
160160
$log.SaveChanges()
161161
Get-WinEvent -ListLog Security | Format-List -Property *
162162
}catch [System.UnauthorizedAccessException]{
163-
$ErrMsg = 'You do not have permission to configure this log!'
163+
$ErrMsg = 'You don't have permission to configure this log!'
164164
$ErrMsg += ' Try running this script with administrator privileges. '
165165
$ErrMsg += $_.Exception.Message
166166
Write-Error $ErrMsg
@@ -445,7 +445,7 @@ other properties from the output. The grouped objects are sent down the pipeline
445445
### Example 12: Get events from an archived event log
446446

447447
`Get-WinEvent` can get event information from saved log files. This sample uses an archived
448-
PowerShell log that is stored on the local computer.
448+
PowerShell log that's stored on the local computer.
449449

450450
```powershell
451451
Get-WinEvent -Path 'C:\Test\Windows PowerShell.evtx'
@@ -470,7 +470,7 @@ the directory and file name.
470470

471471
These commands get a specific number of events from an archived event log. `Get-WinEvent` has
472472
parameters that can get a maximum number of events or the oldest events. This sample uses an
473-
archived PowerShell log that is stored in **C:\Test\PowerShellCore Operational.evtx**.
473+
archived PowerShell log that's stored in **C:\Test\PowerShellCore Operational.evtx**.
474474

475475
```powershell
476476
Get-WinEvent -Path 'C:\Test\PowerShellCore Operational.evtx' -MaxEvents 100
@@ -498,7 +498,7 @@ from newest to oldest.
498498

499499
Event Tracing for Windows (ETW) writes events to the log as events occur. The events are stored in
500500
the order of oldest to newest. An archived ETW file is saved as an `.etl` such as **TraceLog.etl**.
501-
The events are listed in the order in which they are written to the log, so the *Oldest* parameter
501+
The events are listed in the order in which they're written to the log, so the *Oldest* parameter
502502
is required.
503503

504504
```powershell
@@ -509,7 +509,7 @@ Get-WinEvent -Path 'C:\Tracing\TraceLog.etl' -Oldest |
509509

510510
The `Get-WinEvent` cmdlet gets log information from the archived file. The **Path** parameter
511511
specifies the directory and file name. The **Oldest** parameter is used to output events in the
512-
order they are written, oldest to newest. The objects are sent down the pipeline to the
512+
order they're written, oldest to newest. The objects are sent down the pipeline to the
513513
`Sort-Object` cmdlet `Sort-Object` sorts the objects in descending order by the value of the
514514
**TimeCreated** property. The objects are sent down the pipeline to the `Select-Object` cmdlet that
515515
displays the 100 newest events.
@@ -519,7 +519,7 @@ displays the 100 newest events.
519519
This example shows how to get the events from an event trace log file (`.etl`) and an archived
520520
Windows PowerShell log file (`.evtx`). You can combine multiple file types in a single command.
521521
Because the files contain the same type of **.NET Framework** object, **EventLogRecord**, you can
522-
filter them with the same properties. The command requires the **Oldest** parameter because it is
522+
filter them with the same properties. The command requires the **Oldest** parameter because it's
523523
reading from an `.etl` file, but the **Oldest** parameter applies to each file.
524524

525525
```powershell
@@ -529,7 +529,7 @@ Get-WinEvent -Path 'C:\Tracing\TraceLog.etl', 'C:\Test\Windows PowerShell.evtx'
529529

530530
The `Get-WinEvent` cmdlet gets log information from the archived files. The **Path** parameter uses
531531
a comma-separated list to specify each files directory and file name. The **Oldest** parameter is
532-
used to output events in the order they are written, oldest to newest. The objects are sent down the
532+
used to output events in the order they're written, oldest to newest. The objects are sent down the
533533
pipeline to the `Where-Object` cmdlet. `Where-Object` uses a script block to find events with an
534534
**Id** of **403**. The `$_` variable represents the current object in the pipeline and **Id** is the
535535
Event Id property.
@@ -556,14 +556,14 @@ $xmlQuery = @'
556556
<QueryList>
557557
<Query Id="0" Path="Windows PowerShell">
558558
<Select Path="System">*[System[(Level=3) and
559-
TimeCreated[timediff(@SystemTime) >= 86400000]]]</Select>
559+
TimeCreated[timediff(@SystemTime) <= 86400000]]]</Select>
560560
</Query>
561561
</QueryList>
562562
'@
563563
Get-WinEvent -FilterXML $xmlQuery
564564
565565
# Using the FilterXPath parameter:
566-
$XPath = '*[System[Level=3 and TimeCreated[timediff(@SystemTime) >= 86400000]]]'
566+
$XPath = '*[System[Level=3 and TimeCreated[timediff(@SystemTime) <= 86400000]]]'
567567
Get-WinEvent -LogName 'Windows PowerShell' -FilterXPath $XPath
568568
```
569569

@@ -581,7 +581,7 @@ $Date = (Get-Date).AddDays(-2)
581581
Get-WinEvent -FilterHashtable @{ LogName='Application'; StartTime=$Date; Id='1003' }
582582
```
583583

584-
The `Get-Date` cmdlet uses the **AddDays** method to get a date that is two days before the current
584+
The `Get-Date` cmdlet uses the **AddDays** method to get a date that's two days before the current
585585
date. The date object is stored in the `$Date` variable.
586586

587587
The `Get-WinEvent` cmdlet gets log information. The **FilterHashtable** parameter is used to filter
@@ -603,7 +603,7 @@ Get-WinEvent -FilterHashtable @{
603603
}
604604
```
605605

606-
The `Get-Date` cmdlet uses the **AddDays** method to get a date that is seven days before the
606+
The `Get-Date` cmdlet uses the **AddDays** method to get a date that's seven days before the
607607
current date. The date object is stored in the `$StartTime` variable.
608608

609609
The `Get-WinEvent` cmdlet gets log information. The **FilterHashtable** parameter is used to filter
@@ -622,8 +622,8 @@ value is the local computer, **localhost**. This parameter accepts only one comp
622622
To get event logs from remote computers, configure the firewall port for the event log service to
623623
allow remote access.
624624

625-
This cmdlet does not rely on PowerShell remoting. You can use the **ComputerName** parameter even if
626-
your computer is not configured to run remote commands.
625+
This cmdlet doesn't rely on PowerShell remoting. You can use the **ComputerName** parameter even if
626+
your computer isn't configured to run remote commands.
627627

628628
```yaml
629629
Type: System.String
@@ -677,7 +677,7 @@ Hash table queries have the following rules:
677677
- The **Data** value takes event data in an unnamed field. For example, events in classic event
678678
logs.
679679

680-
When `Get-WinEvent` cannot interpret a **key/value** pair, it interprets the key as a case-sensitive
680+
When `Get-WinEvent` can't interpret a **key/value** pair, it interprets the key as a case-sensitive
681681
name for the event data in the event.
682682

683683
The valid `Get-WinEvent` **key/value** pairs are as follows:
@@ -817,7 +817,7 @@ comma-separated list. Wildcards are permitted. You can also pipe log names to th
817817
cmdlet.
818818

819819
> [!NOTE]
820-
> PowerShell does not limit the amount of logs you can request. However, the `Get-WinEvent` cmdlet
820+
> PowerShell doesn't limit the amount of logs you can request. However, the `Get-WinEvent` cmdlet
821821
> queries the Windows API which has a limit of 256. This can make it difficult to filter through all
822822
> of your logs at one time. You can work around this by using a `foreach` loop to iterate through
823823
> each log like this: `Get-WinEvent -ListLog * | ForEach-Object{ Get-WinEvent -LogName $_.LogName }`
@@ -898,7 +898,7 @@ Specifies, as a string array, the event log providers from which this cmdlet get
898898
provider names in a comma-separated list, or use wildcard characters to create provider name
899899
patterns.
900900

901-
An event log provider is a program or service that writes events to the event log. It is not a
901+
An event log provider is a program or service that writes events to the event log. It isn't a
902902
PowerShell provider.
903903

904904
```yaml
@@ -954,7 +954,7 @@ With the **ListProvider** parameter, this cmdlet returns **ProviderMetadata** ob
954954
and later versions of Windows. `Get-EventLog` gets events only in classic event logs. `Get-EventLog`
955955
is retained for backward compatibility.
956956

957-
The `Get-WinEvent` and `Get-EventLog` cmdlets are not supported in Windows Pre-installation
957+
The `Get-WinEvent` and `Get-EventLog` cmdlets aren't supported in Windows Pre-installation
958958
Environment (Windows PE).
959959

960960
## RELATED LINKS

reference/7.4/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ selected event providers. And, you can combine events from multiple sources in a
8080
`Get-WinEvent` allows you to filter events using XPath queries, structured XML queries, and hash
8181
table queries.
8282

83-
If you're not running PowerShell as an Administrator, you might see error messages that you cannot
83+
If you're not running PowerShell as an Administrator, you might see error messages that you can't
8484
retrieve information about a log.
8585

8686
## EXAMPLES
@@ -162,7 +162,7 @@ try{
162162
$log.SaveChanges()
163163
Get-WinEvent -ListLog Security | Format-List -Property *
164164
}catch [System.UnauthorizedAccessException]{
165-
$ErrMsg = 'You do not have permission to configure this log!'
165+
$ErrMsg = 'You don't have permission to configure this log!'
166166
$ErrMsg += ' Try running this script with administrator privileges. '
167167
$ErrMsg += $_.Exception.Message
168168
Write-Error $ErrMsg
@@ -447,7 +447,7 @@ other properties from the output. The grouped objects are sent down the pipeline
447447
### Example 12: Get events from an archived event log
448448

449449
`Get-WinEvent` can get event information from saved log files. This sample uses an archived
450-
PowerShell log that is stored on the local computer.
450+
PowerShell log that's stored on the local computer.
451451

452452
```powershell
453453
Get-WinEvent -Path 'C:\Test\Windows PowerShell.evtx'
@@ -472,7 +472,7 @@ the directory and file name.
472472

473473
These commands get a specific number of events from an archived event log. `Get-WinEvent` has
474474
parameters that can get a maximum number of events or the oldest events. This sample uses an
475-
archived PowerShell log that is stored in **C:\Test\PowerShellCore Operational.evtx**.
475+
archived PowerShell log that's stored in **C:\Test\PowerShellCore Operational.evtx**.
476476

477477
```powershell
478478
Get-WinEvent -Path 'C:\Test\PowerShellCore Operational.evtx' -MaxEvents 100
@@ -500,7 +500,7 @@ from newest to oldest.
500500

501501
Event Tracing for Windows (ETW) writes events to the log as events occur. The events are stored in
502502
the order of oldest to newest. An archived ETW file is saved as an `.etl` such as **TraceLog.etl**.
503-
The events are listed in the order in which they are written to the log, so the *Oldest* parameter
503+
The events are listed in the order in which they're written to the log, so the *Oldest* parameter
504504
is required.
505505

506506
```powershell
@@ -511,7 +511,7 @@ Get-WinEvent -Path 'C:\Tracing\TraceLog.etl' -Oldest |
511511

512512
The `Get-WinEvent` cmdlet gets log information from the archived file. The **Path** parameter
513513
specifies the directory and file name. The **Oldest** parameter is used to output events in the
514-
order they are written, oldest to newest. The objects are sent down the pipeline to the
514+
order they're written, oldest to newest. The objects are sent down the pipeline to the
515515
`Sort-Object` cmdlet `Sort-Object` sorts the objects in descending order by the value of the
516516
**TimeCreated** property. The objects are sent down the pipeline to the `Select-Object` cmdlet that
517517
displays the 100 newest events.
@@ -521,7 +521,7 @@ displays the 100 newest events.
521521
This example shows how to get the events from an event trace log file (`.etl`) and an archived
522522
Windows PowerShell log file (`.evtx`). You can combine multiple file types in a single command.
523523
Because the files contain the same type of **.NET Framework** object, **EventLogRecord**, you can
524-
filter them with the same properties. The command requires the **Oldest** parameter because it is
524+
filter them with the same properties. The command requires the **Oldest** parameter because it's
525525
reading from an `.etl` file, but the **Oldest** parameter applies to each file.
526526

527527
```powershell
@@ -531,7 +531,7 @@ Get-WinEvent -Path 'C:\Tracing\TraceLog.etl', 'C:\Test\Windows PowerShell.evtx'
531531

532532
The `Get-WinEvent` cmdlet gets log information from the archived files. The **Path** parameter uses
533533
a comma-separated list to specify each files directory and file name. The **Oldest** parameter is
534-
used to output events in the order they are written, oldest to newest. The objects are sent down the
534+
used to output events in the order they're written, oldest to newest. The objects are sent down the
535535
pipeline to the `Where-Object` cmdlet. `Where-Object` uses a script block to find events with an
536536
**Id** of **403**. The `$_` variable represents the current object in the pipeline and **Id** is the
537537
Event Id property.
@@ -558,14 +558,14 @@ $xmlQuery = @'
558558
<QueryList>
559559
<Query Id="0" Path="Windows PowerShell">
560560
<Select Path="System">*[System[(Level=3) and
561-
TimeCreated[timediff(@SystemTime) >= 86400000]]]</Select>
561+
TimeCreated[timediff(@SystemTime) <= 86400000]]]</Select>
562562
</Query>
563563
</QueryList>
564564
'@
565565
Get-WinEvent -FilterXML $xmlQuery
566566
567567
# Using the FilterXPath parameter:
568-
$XPath = '*[System[Level=3 and TimeCreated[timediff(@SystemTime) >= 86400000]]]'
568+
$XPath = '*[System[Level=3 and TimeCreated[timediff(@SystemTime) <= 86400000]]]'
569569
Get-WinEvent -LogName 'Windows PowerShell' -FilterXPath $XPath
570570
```
571571

@@ -583,7 +583,7 @@ $Date = (Get-Date).AddDays(-2)
583583
Get-WinEvent -FilterHashtable @{ LogName='Application'; StartTime=$Date; Id='1003' }
584584
```
585585

586-
The `Get-Date` cmdlet uses the **AddDays** method to get a date that is two days before the current
586+
The `Get-Date` cmdlet uses the **AddDays** method to get a date that's two days before the current
587587
date. The date object is stored in the `$Date` variable.
588588

589589
The `Get-WinEvent` cmdlet gets log information. The **FilterHashtable** parameter is used to filter
@@ -605,7 +605,7 @@ Get-WinEvent -FilterHashtable @{
605605
}
606606
```
607607

608-
The `Get-Date` cmdlet uses the **AddDays** method to get a date that is seven days before the
608+
The `Get-Date` cmdlet uses the **AddDays** method to get a date that's seven days before the
609609
current date. The date object is stored in the `$StartTime` variable.
610610

611611
The `Get-WinEvent` cmdlet gets log information. The **FilterHashtable** parameter is used to filter
@@ -643,8 +643,8 @@ value is the local computer, **localhost**. This parameter accepts only one comp
643643
To get event logs from remote computers, configure the firewall port for the event log service to
644644
allow remote access.
645645

646-
This cmdlet does not rely on PowerShell remoting. You can use the **ComputerName** parameter even if
647-
your computer is not configured to run remote commands.
646+
This cmdlet doesn't rely on PowerShell remoting. You can use the **ComputerName** parameter even if
647+
your computer isn't configured to run remote commands.
648648

649649
```yaml
650650
Type: System.String
@@ -699,7 +699,7 @@ Hash table queries have the following rules:
699699
logs.
700700
- `<named-data>` key represents a named event data field.
701701

702-
When `Get-WinEvent` cannot interpret a **key/value** pair, it interprets the key as a case-sensitive
702+
When `Get-WinEvent` can't interpret a **key/value** pair, it interprets the key as a case-sensitive
703703
name for the event data in the event.
704704

705705
The valid `Get-WinEvent` **key/value** pairs are as follows:
@@ -843,7 +843,7 @@ comma-separated list. Wildcards are permitted. You can also pipe log names to th
843843
cmdlet.
844844

845845
> [!NOTE]
846-
> PowerShell does not limit the amount of logs you can request. However, the `Get-WinEvent` cmdlet
846+
> PowerShell doesn't limit the amount of logs you can request. However, the `Get-WinEvent` cmdlet
847847
> queries the Windows API which has a limit of 256. This can make it difficult to filter through all
848848
> of your logs at one time. You can work around this by using a `foreach` loop to iterate through
849849
> each log like this: `Get-WinEvent -ListLog * | ForEach-Object{ Get-WinEvent -LogName $_.LogName }`
@@ -924,7 +924,7 @@ Specifies, as a string array, the event log providers from which this cmdlet get
924924
provider names in a comma-separated list, or use wildcard characters to create provider name
925925
patterns.
926926

927-
An event log provider is a program or service that writes events to the event log. It is not a
927+
An event log provider is a program or service that writes events to the event log. It isn't a
928928
PowerShell provider.
929929

930930
```yaml
@@ -980,7 +980,7 @@ With the **ListProvider** parameter, this cmdlet returns **ProviderMetadata** ob
980980
and later versions of Windows. `Get-EventLog` gets events only in classic event logs. `Get-EventLog`
981981
is retained for backward compatibility.
982982

983-
The `Get-WinEvent` and `Get-EventLog` cmdlets are not supported in Windows Pre-installation
983+
The `Get-WinEvent` and `Get-EventLog` cmdlets aren't supported in Windows Pre-installation
984984
Environment (Windows PE).
985985

986986
## RELATED LINKS

0 commit comments

Comments
 (0)