Skip to content

Commit fc465d2

Browse files
Adjust formatting file signing note
The original note suggests that after copying Win PS formatting files, the signature block should be replaced. However, the files don't actually contain a signature block to begin with. This may cause confusion, so the note is updated with a more generalized suggestion on signing taken from about_Format.ps1xml. Also includes minor style changes and less Windows-specific references.
1 parent 47b6876 commit fc465d2

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

reference/docs-conceptual/developer/format/how-to-create-a-formatting-file-format-ps1xml.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ This topic describes how to create a formatting file (`Format.ps1xml`).
99

1010
> [!NOTE]
1111
> You can also create a formatting file by making a copy of one of the files provided by Windows
12-
> PowerShell. If you make a copy of an existing file, delete the existing digital signature, and add
13-
> your own signature to the new file.
14-
12+
> PowerShell. To protect the users of your `Format.ps1xml` file, sign the file using a digital
13+
> signature. For more information, see [about_Signing][01].
1514
## Create a Format.ps1xml file
1615

17-
1. Create a text file (.txt) using a text editor such as Notepad.
16+
17+
1. Open a new text file using a text editor such as Visual Studio Code.
1818

1919
1. Copy the following lines into the formatting file.
2020

2121
```xml
22-
<?xml version="1.0" encoding="utf-8" ?>
22+
<?xml version="1.0" encoding="utf-8"?>
2323
<Configuration>
2424
<ViewDefinitions>
2525
</ViewDefinitions>
@@ -32,14 +32,18 @@ This topic describes how to create a formatting file (`Format.ps1xml`).
3232
- The `<ViewDefinitions></ViewDefinitions>` tags define the `ViewDefinitions` node. All views are
3333
defined within this node.
3434

35-
1. Save the file to the Windows PowerShell installation folder, to your module folder, or to a
35+
1. Save the file to a folder of your choice. If you are writing a module, save the file to a
3636
subfolder of the module folder. Use the following name format when you save the file:
3737
`MyFile.Format.ps1xml`. Formatting files must use the `.ps1xml` extension.
3838

3939
You are now ready to add views to the formatting file. There is no limit to the number of views
4040
that can be defined in a formatting file. You can add a single view for each object, multiple
4141
views for the same object, or a single view that is used by multiple objects.
4242

43-
## See Also
43+
## See also
44+
45+
- [Writing a Windows PowerShell Formatting and Types File][02]
4446

45-
[Writing a Windows PowerShell Formatting and Types File](./writing-a-powershell-formatting-file.md)
47+
<!-- link references -->
48+
[01]: /powershell/module/microsoft.powershell.core/about/about_signing.md
49+
[02]: (./writing-a-powershell-formatting-file.md)

0 commit comments

Comments
 (0)