Skip to content

Commit 0258527

Browse files
authored
Merge pull request #11789 from MicrosoftDocs/main
2/11/2025 PM Publish
2 parents f7be0a8 + 0b2e6f8 commit 0258527

21 files changed

+224
-164
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ 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]
22-
[-Force] [-NoClobber] [-Description <String>] [-Scope <String>] [-WhatIf] [-Confirm]
23-
[<CommonParameters>]
21+
Export-Alias [-Path] <String> [[-Name] <String[]>] [-PassThru] [-As <ExportAliasFormat>]
22+
[-Append] [-Force] [-NoClobber] [-Description <String>] [-Scope <String>] [-WhatIf]
23+
[-Confirm] [<CommonParameters>]
2424
```
2525

2626
### ByLiteralPath
2727

2828
```
29-
Export-Alias -LiteralPath <String> [[-Name] <String[]>] [-PassThru] [-As <ExportAliasFormat>]
30-
[-Append] [-Force] [-NoClobber] [-Description <String>] [-Scope <String>] [-WhatIf] [-Confirm]
31-
[<CommonParameters>]
29+
Export-Alias -LiteralPath <String> [[-Name] <String[]>] [-PassThru]
30+
[-As <ExportAliasFormat>] [-Append] [-Force] [-NoClobber] [-Description <String>]
31+
[-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
3232
```
3333

3434
## DESCRIPTION
@@ -45,15 +45,15 @@ profile.
4545
### Example 1: Export an alias
4646

4747
```powershell
48-
Export-Alias -Path "alias.csv"
48+
Export-Alias -Path "Alias.csv"
4949
```
5050

5151
This command exports current alias information to a file named Alias.csv in the current directory.
5252

5353
### Example 2: Export an alias unless the export file already exists
5454

5555
```powershell
56-
Export-Alias -Path "alias.csv" -NoClobber
56+
Export-Alias -Path "Alias.csv" -NoClobber
5757
```
5858

5959
This command exports the aliases in the current session to an Alias.csv file.
@@ -64,7 +64,7 @@ exists in the current directory.
6464
### Example 3: Append aliases to a file
6565

6666
```powershell
67-
Export-Alias -Path "alias.csv" -Append -Description "Appended Aliases" -Force
67+
Export-Alias -Path "Alias.csv" -Append -Description "Appended Aliases" -Force
6868
```
6969

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

reference/7.5/Microsoft.PowerShell.Utility/Export-Clixml.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ Creates an XML-based representation of an object or objects and stores it in a f
1818
### ByPath (Default)
1919

2020
```
21-
Export-Clixml [-Depth <Int32>] [-Path] <String> -InputObject <PSObject> [-Force] [-NoClobber]
22-
[-Encoding <Encoding>] [-WhatIf] [-Confirm] [<CommonParameters>]
21+
Export-Clixml [-Depth <Int32>] [-Path] <String> -InputObject <PSObject> [-Force]
22+
[-NoClobber] [-Encoding <Encoding>] [-WhatIf] [-Confirm] [<CommonParameters>]
2323
```
2424

2525
### ByLiteralPath
2626

2727
```
28-
Export-Clixml [-Depth <Int32>] -LiteralPath <String> -InputObject <PSObject> [-Force] [-NoClobber]
29-
[-Encoding <Encoding>] [-WhatIf] [-Confirm] [<CommonParameters>]
28+
Export-Clixml [-Depth <Int32>] -LiteralPath <String> -InputObject <PSObject> [-Force]
29+
[-NoClobber] [-Encoding <Encoding>] [-WhatIf] [-Confirm] [<CommonParameters>]
3030
```
3131

3232
## DESCRIPTION
3333

34-
The `Export-Clixml` cmdlet serialized an object into a Common Language Infrastructure (CLI)
35-
XML-based representation stores it in a file. You can then use the `Import-Clixml` cmdlet to
34+
The `Export-Clixml` cmdlet serializes an object into a Common Language Infrastructure (CLI)
35+
XML-based representation and stores it in a file. You can then use the `Import-Clixml` cmdlet to
3636
recreate the saved object based on the contents of that file. For more information about CLI, see
3737
[Language independence](/dotnet/standard/language-independence).
3838

@@ -192,7 +192,7 @@ The acceptable values for this parameter are as follows:
192192
Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code
193193
pages (like `-Encoding 1251`) or string names of registered code pages (like
194194
`-Encoding "windows-1251"`). For more information, see the .NET documentation for
195-
[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2).
195+
[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A).
196196

197197
Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass
198198
the numeric ID for the current culture's ANSI code page without having to specify it manually.

reference/7.5/Microsoft.PowerShell.Utility/Export-Csv.md

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ file.
1919
### Delimiter (Default)
2020

2121
```
22-
Export-Csv -InputObject <PSObject> [[-Path] <String>] [-LiteralPath <String>] [-Force] [-NoClobber]
23-
[-Encoding <Encoding>] [-Append] [[-Delimiter] <Char>] [-IncludeTypeInformation]
24-
[-NoTypeInformation] [-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [-NoHeader] [-WhatIf]
25-
[-Confirm] [<CommonParameters>]
22+
Export-Csv -InputObject <PSObject> [[-Path] <String>] [-LiteralPath <String>] [-Force]
23+
[-NoClobber] [-Encoding <Encoding>] [-Append] [[-Delimiter] <Char>]
24+
[-IncludeTypeInformation] [-NoTypeInformation] [-QuoteFields <String[]>]
25+
[-UseQuotes <QuoteKind>] [-NoHeader] [-WhatIf] [-Confirm] [<CommonParameters>]
2626
```
2727

2828
### UseCulture
2929

3030
```
31-
Export-Csv -InputObject <PSObject> [[-Path] <String>] [-LiteralPath <String>] [-Force] [-NoClobber]
32-
[-Encoding <Encoding>] [-Append] [-UseCulture] [-IncludeTypeInformation] [-NoTypeInformation]
33-
[-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [-NoHeader] [-WhatIf] [-Confirm]
34-
[<CommonParameters>]
31+
Export-Csv -InputObject <PSObject> [[-Path] <String>] [-LiteralPath <String>] [-Force]
32+
[-NoClobber] [-Encoding <Encoding>] [-Append] [-UseCulture] [-IncludeTypeInformation]
33+
[-NoTypeInformation] [-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [-NoHeader]
34+
[-WhatIf] [-Confirm] [<CommonParameters>]
3535
```
3636

3737
## DESCRIPTION
@@ -53,7 +53,7 @@ file.
5353

5454
```powershell
5555
Get-Process -Name WmiPrvSE |
56-
Select-Object -Property BasePriority,Id,SessionId,WorkingSet |
56+
Select-Object -Property BasePriority, Id, SessionId, WorkingSet |
5757
Export-Csv -Path .\WmiData.csv -NoTypeInformation
5858
Import-Csv -Path .\WmiData.csv
5959
```
@@ -142,11 +142,12 @@ Get-Content -Path .\Processes.csv
142142
The `Get-Culture` cmdlet uses the nested properties **TextInfo** and **ListSeparator** and displays
143143
the current culture's default list separator. The `Get-Process` cmdlet gets **Process** objects. The
144144
process objects are sent down the pipeline to the `Export-Csv` cmdlet. `Export-Csv` converts the
145-
process objects to a series of CSV strings. The **Path** parameter specifies that the `Processes.csv`
146-
file is saved in the current directory. The **UseCulture** parameter uses the current culture's
147-
default list separator as the delimiter. The **NoTypeInformation** parameter removes the **#TYPE**
148-
information header from the CSV output and is not required in PowerShell 6. The `Get-Content` cmdlet
149-
uses the **Path** parameter to display the file located in the current directory.
145+
process objects to a series of CSV strings. The **Path** parameter specifies that the
146+
`Processes.csv` file is saved in the current directory. The **UseCulture** parameter uses the
147+
current culture's default list separator as the delimiter. The **NoTypeInformation** parameter
148+
removes the **#TYPE** information header from the CSV output and is not required in PowerShell 6.
149+
The `Get-Content` cmdlet uses the **Path** parameter to display the file located in the current
150+
directory.
150151

151152
### Example 5: Export processes with type information
152153

@@ -177,10 +178,13 @@ This example describes how to export objects to a CSV file and use the **Append*
177178
objects to an existing file.
178179

179180
```powershell
180-
$AppService = (Get-Service -DisplayName *Application* | Select-Object -Property DisplayName, Status)
181+
$AppService = (Get-Service -DisplayName *Application* |
182+
Select-Object -Property DisplayName, Status)
181183
$AppService | Export-Csv -Path .\Services.Csv -NoTypeInformation
182184
Get-Content -Path .\Services.Csv
183-
$WinService = (Get-Service -DisplayName *Windows* | Select-Object -Property DisplayName, Status)
185+
186+
$WinService = (Get-Service -DisplayName *Windows* |
187+
Select-Object -Property DisplayName, Status)
184188
$WinService | Export-Csv -Path .\Services.csv -NoTypeInformation -Append
185189
Get-Content -Path .\Services.Csv
186190
```
@@ -219,7 +223,7 @@ unexpected output is received, troubleshoot the pipeline syntax.
219223

220224
```powershell
221225
Get-Date | Select-Object -Property DateTime, Day, DayOfWeek, DayOfYear |
222-
Export-Csv -Path .\DateTime.csv -NoTypeInformation
226+
Export-Csv -Path .\DateTime.csv -NoTypeInformation
223227
Get-Content -Path .\DateTime.csv
224228
```
225229

@@ -230,7 +234,7 @@ Get-Content -Path .\DateTime.csv
230234

231235
```powershell
232236
Get-Date | Format-Table -Property DateTime, Day, DayOfWeek, DayOfYear |
233-
Export-Csv -Path .\FTDateTime.csv -NoTypeInformation
237+
Export-Csv -Path .\FTDateTime.csv -NoTypeInformation
234238
Get-Content -Path .\FTDateTime.csv
235239
```
236240

@@ -246,10 +250,10 @@ Get-Content -Path .\FTDateTime.csv
246250
The `Get-Date` cmdlet gets the **DateTime** object. The object is sent down the pipeline to the
247251
`Select-Object` cmdlet. `Select-Object` uses the **Property** parameter to select a subset of object
248252
properties. The object is sent down the pipeline to the `Export-Csv` cmdlet. `Export-Csv` converts
249-
the object to a CSV format. The **Path** parameter specifies that the `DateTime.csv` file is saved in
250-
the current directory. The **NoTypeInformation** parameter removes the **#TYPE** information header
251-
from the CSV output and is not required in PowerShell 6. The `Get-Content` cmdlet uses the **Path**
252-
parameter to display the CSV file located in the current directory.
253+
the object to a CSV format. The **Path** parameter specifies that the `DateTime.csv` file is saved
254+
in the current directory. The **NoTypeInformation** parameter removes the **#TYPE** information
255+
header from the CSV output and is not required in PowerShell 6. The `Get-Content` cmdlet uses the
256+
**Path** parameter to display the CSV file located in the current directory.
253257

254258
When the `Format-Table` cmdlet is used within the pipeline to select properties unexpected results
255259
are received. `Format-Table` sends table format objects down the pipeline to the `Export-Csv` cmdlet
@@ -355,7 +359,7 @@ the file located in the current directory.
355359
This example converts a **DateTime** object to a CSV string.
356360

357361
```powershell
358-
Get-Date | Export-Csv -QuoteFields "DateTime","Date" -Path .\FTDateTime.csv
362+
Get-Date | Export-Csv -QuoteFields "DateTime","Date" -Path .\FTDateTime.csv
359363
Get-Content -Path .\FTDateTime.csv
360364
```
361365

@@ -369,7 +373,7 @@ DateTime,"Thursday, August 22, 2019 11:27:34 AM","8/22/2019 12:00:00 AM",22,Thur
369373
This example converts a **DateTime** object to a CSV string.
370374

371375
```powershell
372-
Get-Date | Export-Csv -UseQuotes AsNeeded -Path .\FTDateTime.csv
376+
Get-Date | Export-Csv -UseQuotes AsNeeded -Path .\FTDateTime.csv
373377
Get-Content -Path .\FTDateTime.csv
374378
```
375379

@@ -391,7 +395,7 @@ $person1 = @{
391395
392396
$person2 = @{
393397
Name = 'Jane Smith'
394-
Number = 1
398+
Number = 2
395399
}
396400
397401
$allPeople = $person1, $person2
@@ -490,7 +494,7 @@ The acceptable values for this parameter are as follows:
490494
Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code
491495
pages (like `-Encoding 1251`) or string names of registered code pages (like
492496
`-Encoding "windows-1251"`). For more information, see the .NET documentation for
493-
[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2).
497+
[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A).
494498

495499
Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass
496500
the numeric ID for the current culture's ANSI code page without having to specify it manually.

reference/7.5/Microsoft.PowerShell.Utility/Export-FormatData.md

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,37 @@ Saves formatting data from the current session in a formatting file.
1818
### ByPath (Default)
1919

2020
```
21-
Export-FormatData -InputObject <ExtendedTypeDefinition[]> -Path <String> [-Force] [-NoClobber]
22-
[-IncludeScriptBlock] [<CommonParameters>]
21+
Export-FormatData -InputObject <ExtendedTypeDefinition[]> -Path <String> [-Force]
22+
[-NoClobber] [-IncludeScriptBlock] [<CommonParameters>]
2323
```
2424

2525
### ByLiteralPath
2626

2727
```
28-
Export-FormatData -InputObject <ExtendedTypeDefinition[]> -LiteralPath <String> [-Force] [-NoClobber]
29-
[-IncludeScriptBlock] [<CommonParameters>]
28+
Export-FormatData -InputObject <ExtendedTypeDefinition[]> -LiteralPath <String> [-Force]
29+
[-NoClobber] [-IncludeScriptBlock] [<CommonParameters>]
3030
```
3131

3232
## DESCRIPTION
3333

34-
The `Export-FormatData` cmdlet creates PowerShell formatting files (format.ps1xml) from
35-
the formatting objects in the current session. It takes the **ExtendedTypeDefinition** objects that
34+
The `Export-FormatData` cmdlet creates PowerShell formatting files (format.ps1xml) from the
35+
formatting objects in the current session. It takes the **ExtendedTypeDefinition** objects that
3636
`Get-FormatData` returns and saves them in a file in XML format.
3737

38-
PowerShell uses the data in formatting files (format.ps1xml) to generate the default display
39-
of Microsoft .NET Framework objects in the session. You can view and edit the formatting files and
38+
PowerShell uses the data in formatting files (format.ps1xml) to generate the default display of
39+
Microsoft .NET Framework objects in the session. You can view and edit the formatting files and
4040
use the Update-FormatData cmdlet to add the formatting data to a session.
4141

42-
For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md).
42+
For more information about formatting files in PowerShell, see
43+
[about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md).
4344

4445
## EXAMPLES
4546

4647
### Example 1: Export session format data
4748

4849
```powershell
49-
Get-FormatData -TypeName "*" | Export-FormatData -Path "allformat.ps1xml" -IncludeScriptBlock
50+
Get-FormatData -TypeName "*" |
51+
Export-FormatData -Path "AllFormat.ps1xml" -IncludeScriptBlock
5052
```
5153

5254
This command exports all of the format data in the session to the AllFormat.ps1xml file.
@@ -55,16 +57,16 @@ The command uses the `Get-FormatData` cmdlet to get the format data in the sessi
5557
(all) for the **TypeName** parameter directs the cmdlet to get all of the data in the session.
5658

5759
The command uses a pipeline operator (`|`) to send the format data from the `Get-FormatData` command
58-
to the `Export-FormatData` cmdlet, which exports the format data to the AllFormat.ps1 file.
60+
to the `Export-FormatData` cmdlet, which exports the format data to the AllFormat.ps1xml file.
5961

6062
The `Export-FormatData` command uses the **IncludeScriptBlock** parameter to include script blocks
6163
in the format data in the file.
6264

6365
### Example 2: Export format data for a type
6466

6567
```powershell
66-
$F = Get-FormatData -TypeName "helpinfoshort"
67-
Export-FormatData -InputObject $F -Path "c:\test\help.format.ps1xml" -IncludeScriptBlock
68+
$F = Get-FormatData -TypeName "HelpInfoShort"
69+
Export-FormatData -InputObject $F -Path "c:\test\Help.format.ps1xml" -IncludeScriptBlock
6870
```
6971

7072
These commands export the format data for the **HelpInfoShort** type to the Help.format.ps1xml file.
@@ -79,8 +81,9 @@ script blocks in the output.
7981
### Example 3: Export format data without a script block
8082

8183
```powershell
82-
Get-FormatData -TypeName "System.Diagnostics.Process" | Export-FormatData -Path process.format.ps1xml
83-
Update-FormatData -PrependPath ".\process.format.ps1xml"
84+
Get-FormatData -TypeName "System.Diagnostics.Process" |
85+
Export-FormatData -Path process.format.ps1xml
86+
Update-FormatData -PrependPath ".\Process.format.ps1xml"
8487
Get-Process p*
8588
```
8689

@@ -103,9 +106,9 @@ it to the Process.format.ps1xml file in the current directory.
103106
In this case, the `Export-FormatData` command does not use the **IncludeScriptBlock** parameter.
104107

105108
The second command uses the `Update-FormatData` cmdlet to add the Process.format.ps1xml file to the
106-
current session. The command uses the **PrependPath** parameter to ensure that the formatting data for
107-
process objects in the Process.format.ps1xml file is found before the standard formatting data for
108-
process objects.
109+
current session. The command uses the **PrependPath** parameter to ensure that the formatting data
110+
for process objects in the Process.format.ps1xml file is found before the standard formatting data
111+
for process objects.
109112

110113
The third command shows the effects of this change. The command uses the `Get-Process` cmdlet to
111114
get processes that have names that begin with P. The output shows that property values that are
@@ -205,9 +208,9 @@ Accept wildcard characters: False
205208

206209
### -Path
207210

208-
Specifies a location for the output file.
209-
Enter a path (optional) and file name with a format.ps1xml file name extension.
210-
If you omit the path, `Export-FormatData` creates the file in the current directory.
211+
Specifies a location for the output file. Enter a path (optional) and file name with a
212+
format.ps1xml file name extension. If you omit the path, `Export-FormatData` creates the file in
213+
the current directory.
211214

212215
If you use a file name extension other than .ps1xml, the `Update-FormatData` cmdlet will not
213216
recognize the file.
@@ -232,7 +235,8 @@ Accept wildcard characters: False
232235

233236
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
234237
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
235-
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
238+
-WarningAction, and -WarningVariable. For more information, see
239+
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
236240

237241
## INPUTS
238242

0 commit comments

Comments
 (0)