Skip to content

Commit 8c5654f

Browse files
authored
Fix formatting (#11651)
1 parent a21048a commit 8c5654f

File tree

3 files changed

+198
-156
lines changed

3 files changed

+198
-156
lines changed

reference/5.1/Microsoft.PowerShell.Utility/Export-Alias.md

Lines changed: 66 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,27 @@ Exports information about currently defined aliases to a file.
1818
### ByPath (Default)
1919

2020
```
21-
Export-Alias [-Path] <String> [[-Name] <String[]>] [-PassThru] [-As <ExportAliasFormat>] [-Append] [-Force]
22-
[-NoClobber] [-Description <String>] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
21+
Export-Alias [-Path] <String> [[-Name] <String[]>] [-PassThru] [-As <ExportAliasFormat>] [-Append]
22+
[-Force] [-NoClobber] [-Description <String>] [-Scope <String>] [-WhatIf] [-Confirm]
23+
[<CommonParameters>]
2324
```
2425

2526
### ByLiteralPath
2627

2728
```
28-
Export-Alias -LiteralPath <String> [[-Name] <String[]>] [-PassThru] [-As <ExportAliasFormat>] [-Append]
29-
[-Force] [-NoClobber] [-Description <String>] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
29+
Export-Alias -LiteralPath <String> [[-Name] <String[]>] [-PassThru] [-As <ExportAliasFormat>]
30+
[-Append] [-Force] [-NoClobber] [-Description <String>] [-Scope <String>] [-WhatIf] [-Confirm]
31+
[<CommonParameters>]
3032
```
3133

3234
## DESCRIPTION
3335

34-
The `Export-Alias` cmdlet exports the aliases in the current session to a file.
35-
If the output file does not exist, the cmdlet will create it.
36+
The `Export-Alias` cmdlet exports the aliases in the current session to a file. If the output file
37+
does not exist, the cmdlet will create it.
3638

37-
`Export-Alias` can export the aliases in a particular scope or all scopes, it can generate the data in CSV format or as a series of Set-Alias commands that you can add to a session or to a PowerShell profile.
39+
`Export-Alias` can export the aliases in a particular scope or all scopes, it can generate the data
40+
in CSV format or as a series of Set-Alias commands that you can add to a session or to a PowerShell
41+
profile.
3842

3943
## EXAMPLES
4044

@@ -54,7 +58,8 @@ Export-Alias -Path "alias.csv" -NoClobber
5458

5559
This command exports the aliases in the current session to an Alias.csv file.
5660

57-
Because the **NoClobber** parameter is specified, the command will fail if an Alias.csv file already exists in the current directory.
61+
Because the **NoClobber** parameter is specified, the command will fail if an Alias.csv file already
62+
exists in the current directory.
5863

5964
### Example 3: Append aliases to a file
6065

@@ -64,9 +69,11 @@ Export-Alias -Path "alias.csv" -Append -Description "Appended Aliases" -Force
6469

6570
This command appends the aliases in the current session to the Alias.csv file.
6671

67-
The command uses the **Description** parameter to add a description to the comments at the top of the file.
72+
The command uses the **Description** parameter to add a description to the comments at the top of
73+
the file.
6874

69-
The command also uses the **Force** parameter to overwrite any existing Alias.csv files, even if they have the read-only attribute.
75+
The command also uses the **Force** parameter to overwrite any existing Alias.csv files, even if
76+
they have the read-only attribute.
7077

7178
### Example 4: Export aliases as a script
7279

@@ -79,23 +86,27 @@ Invoke-Command -Session $S -FilePath .\alias.ps1
7986

8087
This example shows how to use the script file format that `Export-Alias` generates.
8188

82-
The first command exports the aliases in the session to the Alias.ps1 file.
83-
It uses the **As** parameter with a value of Script to generate a file that contains a Set-Alias command for each alias.
89+
The first command exports the aliases in the session to the Alias.ps1 file. It uses the **As**
90+
parameter with a value of Script to generate a file that contains a Set-Alias command for each
91+
alias.
8492

8593
The second command adds the aliases in the Alias.ps1 file to the CurrentUser-CurrentHost profile.
86-
The path to the profile is saved in the `$Profile` variable.
87-
The command uses the `Get-Content` cmdlet to get the aliases from the Alias.ps1 file and the `Add-Content` cmdlet to add them to the profile.
88-
For more information, see [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md).
94+
The path to the profile is saved in the `$Profile` variable. The command uses the `Get-Content`
95+
cmdlet to get the aliases from the Alias.ps1 file and the `Add-Content` cmdlet to add them to the
96+
profile. For more information, see
97+
[about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md).
8998

90-
The third and fourth commands add the aliases in the Alias.ps1 file to a remote session on the Server01 computer.
91-
The third command uses the `New-PSSession` cmdlet to create the session.
92-
The fourth command uses the **FilePath** parameter of the `Invoke-Command` cmdlet to run the Alias.ps1 file in the new session.
99+
The third and fourth commands add the aliases in the Alias.ps1 file to a remote session on the
100+
Server01 computer. The third command uses the `New-PSSession` cmdlet to create the session. The
101+
fourth command uses the **FilePath** parameter of the `Invoke-Command` cmdlet to run the Alias.ps1
102+
file in the new session.
93103

94104
## PARAMETERS
95105

96106
### -Append
97107

98-
Indicates that this cmdlet appends the output to the specified file, rather than overwriting the existing contents of that file.
108+
Indicates that this cmdlet appends the output to the specified file, rather than overwriting the
109+
existing contents of that file.
99110

100111
```yaml
101112
Type: System.Management.Automation.SwitchParameter
@@ -115,11 +126,9 @@ Specifies the output format.
115126
CSV is the default.
116127
The acceptable values for this parameter are:
117128
118-
- CSV.
119-
Comma-separated value (CSV) format.
120-
- Script.
121-
Creates a `Set-Alias` command for each exported alias.
122-
If you name the output file with a .ps1 file name extension, you can run it as a script to add the aliases to any session.
129+
- CSV. Comma-separated value (CSV) format.
130+
- Script. Creates a `Set-Alias` command for each exported alias. If you name the output file with a
131+
.ps1 file name extension, you can run it as a script to add the aliases to any session.
123132

124133
```yaml
125134
Type: Microsoft.PowerShell.Commands.ExportAliasFormat
@@ -136,8 +145,8 @@ Accept wildcard characters: False
136145

137146
### -Description
138147

139-
Specifies the description of the exported file.
140-
The description appears as a comment at the top of the file, following the header information.
148+
Specifies the description of the exported file. The description appears as a comment at the top of
149+
the file, following the header information.
141150

142151
```yaml
143152
Type: System.String
@@ -157,8 +166,9 @@ Forces the command to run without asking for user confirmation.
157166

158167
Overwrites the output file, even if the read-only attribute is set on the file.
159168

160-
By default, `Export-Alias` overwrites files without warning, unless the read-only or hidden attribute is set or the **NoClobber** parameter is used in the command.
161-
The **NoClobber** parameter takes precedence over the **Force** parameter when both are used in a command.
169+
By default, `Export-Alias` overwrites files without warning, unless the read-only or hidden
170+
attribute is set or the **NoClobber** parameter is used in the command. The **NoClobber** parameter
171+
takes precedence over the **Force** parameter when both are used in a command.
162172

163173
The **Force** parameter cannot force `Export-Alias` to overwrite files with the hidden attribute.
164174

@@ -176,11 +186,10 @@ Accept wildcard characters: False
176186

177187
### -LiteralPath
178188

179-
Specifies the path to the output file.
180-
Unlike **Path**, the value of the **LiteralPath** parameter is used exactly as it is typed.
181-
No characters are interpreted as wildcards.
182-
If the path includes escape characters, enclose it in single quotation marks.
183-
Single quotation marks tell PowerShell not to interpret any characters as escape sequences.
189+
Specifies the path to the output file. Unlike **Path**, the value of the **LiteralPath** parameter
190+
is used exactly as it is typed. No characters are interpreted as wildcards. If the path includes
191+
escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not
192+
to interpret any characters as escape sequences.
184193

185194
```yaml
186195
Type: System.String
@@ -196,8 +205,7 @@ Accept wildcard characters: False
196205

197206
### -Name
198207

199-
Specifies the names as an array of the aliases to export.
200-
Wildcards are permitted.
208+
Specifies the names as an array of the aliases to export. Wildcards are permitted.
201209

202210
By default, `Export-Alias` exports all aliases in the session or scope.
203211

@@ -215,12 +223,14 @@ Accept wildcard characters: True
215223

216224
### -NoClobber
217225

218-
Indicates that this cmdlet prevents `Export-Alias` from overwriting any files, even if the **Force** parameter is used in the command.
226+
Indicates that this cmdlet prevents `Export-Alias` from overwriting any files, even if the **Force**
227+
parameter is used in the command.
219228

220-
If the **NoClobber** parameter is omitted, `Export-Alias` will overwrite an existing file without warning, unless the read-only attribute is set on the file.
221-
*NoClobber* takes precedence over the **Force** parameter, which permits `Export-Alias` to overwrite a file with the read-only attribute.
229+
If the **NoClobber** parameter is omitted, `Export-Alias` will overwrite an existing file without
230+
warning, unless the read-only attribute is set on the file. **NoClobber** takes precedence over the
231+
**Force** parameter, which permits `Export-Alias` to overwrite a file with the read-only attribute.
222232

223-
*NoClobber* does not prevent the **Append** parameter from adding content to an existing file.
233+
**NoClobber** does not prevent the **Append** parameter from adding content to an existing file.
224234

225235
```yaml
226236
Type: System.Management.Automation.SwitchParameter
@@ -236,8 +246,8 @@ Accept wildcard characters: False
236246

237247
### -PassThru
238248

239-
Returns an object representing the item with which you are working.
240-
By default, this cmdlet does not generate any output.
249+
Returns an object representing the item with which you are working. By default, this cmdlet does not
250+
generate any output.
241251

242252
```yaml
243253
Type: System.Management.Automation.SwitchParameter
@@ -253,8 +263,8 @@ Accept wildcard characters: False
253263

254264
### -Path
255265

256-
Specifies the path to the output file.
257-
Wildcards are permitted, but the resulting path value must resolve to a single file name.
266+
Specifies the path to the output file. Wildcards are permitted, but the resulting path value must
267+
resolve to a single file name.
258268

259269
```yaml
260270
Type: System.String
@@ -270,16 +280,17 @@ Accept wildcard characters: True
270280

271281
### -Scope
272282

273-
Specifies the scope from which the aliases should be exported.
274-
The acceptable values for this parameter are:
283+
Specifies the scope from which the aliases should be exported. The acceptable values for this
284+
parameter are:
275285

276-
- Global
277-
- Local
278-
- Script
279-
- A number relative to the current scope (0 through the number of scopes where 0 is the current scope and 1 is its parent)
286+
- `Global`
287+
- `Local`
288+
- `Script`
289+
- A number relative to the current scope (0 through the number of scopes where 0 is the current
290+
scope and 1 is its parent)
280291

281-
The default value is Local.
282-
For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md).
292+
The default value is `Local`. For more information, see
293+
[about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md).
283294

284295
```yaml
285296
Type: System.String
@@ -328,7 +339,10 @@ Accept wildcard characters: False
328339

329340
### CommonParameters
330341

331-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
342+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
343+
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
344+
-WarningAction, and -WarningVariable. For more information, see
345+
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
332346

333347
## INPUTS
334348

0 commit comments

Comments
 (0)