You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update the example of `Where-Object -IsNot` (#1841)
* Update Example 5 in Group-Object.md (#1845)
* removing @{Text=} tags
* fixing UTF8 characters
* removed empty H3
* added H3 for input and output types
* removed mangled UTF8 character
* updating Out-* commands with -NoNewLine per Issue 1739
* Fix the example of `Format-Table -DisplayError` (#1848)
The example is a `-DisplayError` parameter example. But it uses `-ShowError` parameter.
* Fix the example of `Format-Wide -DisplayError` (#1850)
* Fix the example of `Format-Custom -DisplayError` (#1849)
The example is a -DisplayError parameter example. But it uses -ShowError parameter.
* updating set-acl docs per PR#901
* using semantic link breaks
* Fix the example of `Format-Wide -ShowError` (#1851)
* Fixed Test-ScriptFileInfo example (#1852)
* fixing issue 1768
* Formatting, example fix for Body parameter (#1847)
1. Replaced variable names with PascalCase convention and for consistency
2. Removed directory information [c:\] in the examples
3. Put powershell keyword for formatting examples
4. Replaced Invoke-RestMethod with Invoke-WebRequest in the Body example, added method Post
5. Removed InformationAction and InformationVariable parameters, which were mistakenly a copy of Body, included already in CommonVariables part
* fixing style consistency across articles
* Fix example numbers in Resume-Job.md (#1857)
Example 4 is duplicated.
* Fixes typo $WebSiteName in separatingEnvData.md (#1856)
- Adds the website name to common node property inside configuration data.
- Also, it is now referenced (e.g. $Node.WebSiteName) in the DSC configuration document in MyWebApp.ps1.
* Updates configurations.md (#1855)
Two set of changes made.
- Example scripts e.g. MyDscConfiguration.ps1 define the configuration inside them and call the configuration at the end line. Removed the call to the configuration at the end. Since the article demonstrates dot-sourcing the file and calling the configuration explicitly.
- Fixed typo in the file name (TEST-PC1.mof to localhost.mof ), since the ComputerName was not specified it should default to using 'localhost' as the default argument for it.
P.S. - There is a comment on the web-page regarding the fixes made
* Fix typo in comment (#1854)
* Updating the help content for v6. (#1853)
* Updating the help content for v6.
* Address code review comments
* Fix broken links
* Fix example numbers in about_Transactions.md (#1859)
Example number '7' is duplicated.
* Update Alias-Provider.md (#1831)
1. Removed statement that an alias is to an executable, the definition cotnains the path. It may - but does not need to be. For example:
Try Set-Alias np Notepad then look at the definition.
2. Clarified that an alias can also be to a powershell script (ps1 file).
3. Tidied up the language removing multiple 'And,' clauses to improve readability.
* Add documentation of new -AsHashtable switch for ConvertFrom-Json introduced by PR #5043 (#1858)
* add documentation of new -AsHashTable switch for ConvertFrom-Json and also document the behaviour in case of duplicate strings.
* correct casing of -AsHashtable switch.
* Address PR comments about -AsHashtable switch for ConvertFrom-Json.md
* Accept pipeline input: False for -AsHashtable switch in ConvertFrom-Json.md
* Revert "Accept pipeline input: False for -AsHashtable switch in ConvertFrom-Json.md"
Accidentally change the wrong field.
This reverts commit 6e76191.
* Accept pipeline input: False for -AsHashtable switch in ConvertFrom-Json.md
* Fix example numbers in Invoke-WebRequest.md (#1862)
Example number '4' is duplicated.
* reformatting and integrating changes from PR#1831 (#1860)
* Fix example numbers in Get-Help.md (#1869)
Example number 12 and 13 are missing.
* Fix example numbers in Import-Module.md (#1868)
Example number '10' is duplicated.
* Fix example number in ConvertTo-Html.html (#1867)
Example number '10' is duplicated.
* Update dscCiCd.md (#1865)
Missing a period on line 378. Should be `$(Build.ArtifactStagingDirectory)\` not `$(BuildArtifactStagingDirectory)\`.
* Web Cmdlets 6.0.0 Documentation Refresh (#1870)
* Web Cmdlets 6.0.0 Documentation Refresh
* Address PR Feedback
* Merge Example 4 and 5 in Get-Member.md (#1874)
Example 4 and 5 in Get-Member.md v3.0 and v4.0 are almost the same. They should be merged as with v5.0.
* Remove hash algorithms unsupported in v6.0 (#1873)
MACTripleDES and RIPEMD160 are no longer supported in v6.0.
* Update outputs of Get-Verb (#1872)
Since v6.0, `Get-Verb` returns not MemberDefinition but VerbInfo that has Verb and Group properties.
* Fix typo in ConvertTo-Html.md (UTF-x) (#1879)
* Fix "Accept wildcard characters" in Get-Service.md v6 (#1878)
* Fixed "False" -> "True" (`DisplayName`, `Exclude`, `Include`, and `Name`)
* Removed `InformationAction` and `InformationVariable`
* Fixed Get-WindowsFeature cmdlet HyperLink (#1877)
* Fixed Get-WindowsFeature cmdlet HyperLink
Minor edit. Update Get-WindowsFeature cmdlet HyperLink to https://technet.microsoft.com/library/jj205469(v=wps.630).aspx
* Changed URL to new docs.microsoft.com location
The TechNet URL did not work. TechNet and MSDN are being retired.
* Update Get-WinEvent.md (#1876)
Removed future tense in a couple of places to improve readability. Minor edit.
* Update Example 8 in Get-Process.md (find the owner of a process) (#1875)
* Update Example 8 in Get-Process.md (Find the owner of a process)
* Update to attempt to avoid build errors
It seems that the build system does not accept multiple script blocks per one Example header.
* updated localmachine\Root to LocalMachine\My (#1880)
The example where we import the PFX on the target node should import the cert into Personal store and not root.
* Update Group property example in Get-Verb.md (#1881)
* adding missing space (#1885)
* removing stray character (#1886)
* Update Example 9 in Get-Process.md (#1888)
* powershell -> pwsh (only v6.0)
* Windows PowerShell -> PowerShell
* Remove "About ISE" files of v6.0 (#1891)
* Remove "About ISE" files of v6.0
ISE is no longer bundled with PowerShell 6.0.
* Remove links for "About ISE" files of v6.0
* Update Get-Process.md (#1890)
Fixed name parameter details to show it accepts wildcards in the name
* Update productincompat.md (#1892)
The list of compatible systems should include Skype For Business Server 2015 and Lync Server 2013.
* Update unapproved verbs examples in Get-Verb.md (#1896)
* Updated Example 4
* Removed Example 5
* Removing extra space in the Example 5A script (#1894)
It was highlighting as string in the documentation, I was trying to remove all the extra space.
* fixing merge conflict
* updates to style and contrib
* tweak format
* tweak format 2
* fix typo
* fix number list example
* adding review feedback
* fix broken links
* incorporating feedback from zach
* reformatting About_* for 80 columns - part 1
* reformat about_*
* reformatting About_* topics - Part 2
* fixing broken links
* fixing more broken links
* more broken links fixed
* Fix parameter's position in Get-Random.md (#1901)
* Fix parameter's position in Measure-Command.md (#1905)
* Fix parameter's position in Trace-Command.md (#1904)
* Actually call the configuration in the example (#1906)
On line 74, it says...
"The last line of the example containing only the name of the configuration, calls the configuration."
This change actually makes that call.
* reformatting About_* for 80 columns - part 3 (#1902)
* reformatting About_*
* reformatting About_* part 3
* fixing broken links
* fixing more broken links
* one more time with the links
* reformatting About_* for 80 columns - part 4
* Adding PreRelease versioning info for PSGallery & PSGet (#1903)
* PowerShellGet PreRelease Support
Adding descriptive doc for pre-release versioning support
* Correcting typos in pre-release doc
Minor typos and case issues fixed
* Updated prerelease info based on feedback
Mostly cosmetic updates. Functional change: added line 28, stating we only support 3-segment module versions.
* Adding prerelease to module install update find save commands
* Updating PSGet -Script commands for Prerelease support
* Hyphen listed as optional rather than preferred in Prereleasestring
* Minor corrections from Rebro review
* Addressing @sdwheeler feedback on links and double slashes
* Fixing broken link
* Update PreReleaseScript.md
* Style tweaks in STYLE.md (#1913)
* Fix YAML metadata on "Understanding Concepts" (#1911)
I'm not quite sure what this means, but it certainly looks terrible on docs.microsoft.com when it's malformed.
(To be perfectly honest, I only managed to even figure out it's called "YAML metadata" by peeking at the DOM of github's HTML.)
* Fix parameter's position in Join-Path.md (#1909)
* typo correction on line 85 (#1916)
E:\Windows\Sytem32 sould be E:\Windows\System32
* Fix parameter's position in Get-TraceSource.md (#1917)
* Changed required PSGet version to 1.6.0 (#1920)
* Update Example 5 in Get-Process.md (#1923)
* fixing backlashes reported in PR1921 (#1924)
* fixing backlashes reported in PR1921
* found more backslashes
* reformatting About_* for 80 columns - part 5
* reformatting About_* for 80 columns - part 6
* incorporating review feedback
* reformatting About_* for 80 columns - part 7
* Fixed formatting of output per issue #808
Explains how to redirect output from Windows PowerShell® to text files.
15
12
13
+
Explains how to redirect output from PowerShell to text files.
16
14
17
15
## LONG DESCRIPTION
18
-
By default, Windows PowerShell sends its command output to the Windows PowerShell console. However, you can direct the output to a text file, and you can redirect error output to the regular output stream.
19
16
20
-
You can use the following methods to redirect output:
17
+
By default, PowerShell sends its command output to the PowerShell console.
18
+
However, you can direct the output to a text file, and you can redirect error
19
+
output to the regular output stream.
21
20
22
-
- Use the Out-File cmdlet, which sends command output to a text file. Typically, you use the Out-File cmdlet when you need to use its parameters, such as the Encoding, Force, Width, or NoClobber parameters.
21
+
You can use the following methods to redirect output:
23
22
24
-
- Use the Tee-Object cmdlet, which sends command output to a text file and then sends it to the pipeline.
23
+
- Use the `Out-File` cmdlet, which sends command output to a text file.
24
+
Typically, you use the `Out-File` cmdlet when you need to use its parameters,
25
+
such as the **Encoding**, **Force**, **Width**, or **NoClobber** parameters.
25
26
26
-
- Use the Windows PowerShell redirection operators.
27
+
- Use the Tee-Object cmdlet, which sends command output to a text file and
28
+
then sends it to the pipeline.
27
29
30
+
- Use the PowerShell redirection operators.
28
31
29
-
### WINDOWS POWERSHELL REDIRECTION OPERATORS
30
-
The redirection operators enable you to send particular types of output to files and to the success output stream.
32
+
### POWERSHELL REDIRECTION OPERATORS
31
33
32
-
The Windows PowerShell redirection operators use the following characters to represent each output type:
34
+
The redirection operators enable you to send particular types of output to
35
+
files and to the success output stream.
33
36
37
+
The PowerShell redirection operators use the following characters to represent
38
+
each output type:
34
39
35
40
```
36
-
* All output
37
-
1 Success output
38
-
2 Errors
39
-
3 Warning messages
40
-
4 Verbose output
41
+
* All output
42
+
1 Success output
43
+
2 Errors
44
+
3 Warning messages
45
+
4 Verbose output
41
46
5 Debug messages
42
47
```
43
48
49
+
NOTE: The All (\*), Warning (3), Verbose (4) and Debug (5) redirection
50
+
operators were introduced in PowerShell 3.0. They do not work in earlier
51
+
versions of PowerShell.
44
52
45
-
NOTE: The All (\*), Warning (3), Verbose (4) and Debug (5) redirection operators were introduced in Windows PowerShell 3.0. They do not work in earlier versions of Windows PowerShell.
53
+
The PowerShell redirection operators are as follows.
46
54
47
-
The Windows PowerShell redirection operators are as follows.
to the specified file. { Get-Process PowerShell, none
115
+
Write-Warning "Test!"
116
+
*>> Appends all output types Write-Verbose "Test Verbose"
117
+
to the contents of the Write-Debug "Test Debug" }
118
+
specified file.
119
+
Test-Output *> Test-Output.txt
120
+
*>&1 Sends all output types Test-Output *>> Test-Output.txt
121
+
(*) to the success Test-Output *>&1
122
+
output stream.
123
+
```
120
124
121
125
The syntax of the redirection operators is as follows:
122
126
123
-
124
127
```
125
128
<input> <operator> [<path>\]<file>
126
129
```
127
130
131
+
If the specified file already exists, the redirection operators that do not
132
+
append data (> and n>) overwrite the current contents of the file without
133
+
warning. However, if the file is a read-only, hidden, or system file, the
134
+
redirection fails. The append redirection operators (>> and n>>) do not write
135
+
to a read-only file, but they append content to a system or hidden file.
128
136
129
-
If the specified file already exists, the redirection operators that do not append data (> and n>) overwrite the current contents of the file without warning. However, if the file is a read-only, hidden, or system file, the redirection fails. The append redirection operators (>> and n>>) do not write to a read-only file, but they append content to a system or hidden file.
130
-
131
-
To force the redirection of content to a read-only, hidden, or system file, use the Out-File cmdlet with its Force parameter. When you are writing to files, the redirection operators use Unicode encoding. If the file has a different encoding, the output might not be formatted correctly. To redirect content to non-Unicode files, use the Out-File cmdlet with its Encoding parameter.
132
-
137
+
To force the redirection of content to a read-only, hidden, or system file,
138
+
use the Out-File cmdlet with its Force parameter. When you are writing to
139
+
files, the redirection operators use Unicode encoding. If the file has a
140
+
different encoding, the output might not be formatted correctly. To redirect
141
+
content to non-Unicode files, use the Out-File cmdlet with its Encoding
0 commit comments