Skip to content

Conversation

@surfingoldelephant
Copy link
Contributor

PR Summary

This PR fixes various .ps1xml formatting file doc issues.

  • Fixes the wrong paths used in about_Format.ps1xml examples.
    • Example paths are also now consistent across all doc versions.
  • Creates the directory used in the first example to avoid errors (Copy-Item/Export-FormatData doesn't create missing directories).
  • Fixes the incorrect assertion that formatting files must use .format.ps1xml (only .ps1xml is required).
  • Adds a more generalized note about file signing to the developer doc.
  • Replaces Windows-specific references to a cross-platform alternative (e.g., Notepad -> Visual Studio Code).
  • Various style changes.

PR Checklist

  • Descriptive Title: This PR's title is a synopsis of the changes it proposes.
  • Summary: This PR's summary describes the scope and intent of the change.
  • Contributor's Guide: I have read the contributor's guide.
  • Style: This PR adheres to the style guide.

This fixes the wrong path used in both `Update-FormatData` examples.

The paths used to initially create the custom formatting files are
.\MyDotNetTypes.Format.ps1xml and .\MyFileSystem.Format.ps1xml.

Before this change, Update-FormatData -PrependPath incorrectly pointed
to $HOME\Format\CultureInfo.Format.ps1xml and
$PSHOME\Format\MyFileSystem.Format.ps1xml.
Both Update-FormatData examples now use the $HOME\Format example path.
This also updates the first example to create the directory before
calling Export-FormatData, as the directory doesn't exist by default
and Export-FormatData fails if part of the path is missing.
This fixes the incorrect assertion that formatting files **must** use
`.format.ps1xml` (only `.ps1xml` is required).
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.
The 7.x docs use `$HOME\Format` as an example directory. This updates
the 5.1 doc to use the same path.

It also removes the suggestion to place custom formatting files in Win
PS's `$PSHOME`. As this is a system directory, it's not an appropriate
location for user files.
@learn-build-service-prod
Copy link
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit b3bfac6:

⚠️ Validation status: warnings

File Status Preview URL Details
reference/docs-conceptual/developer/format/how-to-create-a-formatting-file-format-ps1xml.md ⚠️Warning View (>=powershell-5.1) Details
reference/5.1/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md ✅Succeeded View (powershell-5.1)
reference/7.4/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md ✅Succeeded View (powershell-7.4)
reference/7.5/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md ✅Succeeded View (powershell-7.5)
reference/7.6/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md ✅Succeeded View (powershell-7.6)

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

  • Line 45, Column 3: [Warning: file-not-found - See documentation] Invalid file link: '(./writing-a-powershell-formatting-file.md)'.
  • Line 13, Column 40: [Suggestion: learn-site-link-broken - See documentation] Link '/powershell/module/microsoft.powershell.core/about/about_signing.md' points to a learn site page that doesn't exist. Check the path or URL and update the link.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@learn-build-service-prod
Copy link
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit dee3796:

⚠️ Validation status: warnings

File Status Preview URL Details
reference/docs-conceptual/developer/format/how-to-create-a-formatting-file-format-ps1xml.md ⚠️Warning View (>=powershell-5.1) Details
reference/5.1/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md ✅Succeeded View (powershell-5.1)
reference/7.4/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md ✅Succeeded View (powershell-7.4)
reference/7.5/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md ✅Succeeded View (powershell-7.5)
reference/7.6/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md ✅Succeeded View (powershell-7.6)

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

  • Line 45, Column 3: [Warning: file-not-found - See documentation] Invalid file link: '(./writing-a-powershell-formatting-file.md)'.
  • Line 13, Column 40: [Suggestion: learn-site-link-broken - See documentation] Link '/powershell/module/microsoft.powershell.core/about/about_signing.md' points to a learn site page that doesn't exist. Check the path or URL and update the link.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@learn-build-service-prod
Copy link
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 1918911:

💡 Validation status: suggestions

File Status Preview URL Details
reference/docs-conceptual/developer/format/how-to-create-a-formatting-file-format-ps1xml.md 💡Suggestion View (>=powershell-5.1) Details
reference/5.1/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md ✅Succeeded View (powershell-5.1)
reference/7.4/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md ✅Succeeded View (powershell-7.4)
reference/7.5/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md ✅Succeeded View (powershell-7.5)
reference/7.6/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md ✅Succeeded View (powershell-7.6)

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

  • Line 13, Column 40: [Suggestion: learn-site-link-broken - See documentation] Link '/powershell/module/microsoft.powershell.core/about/about_signing.md' points to a learn site page that doesn't exist. Check the path or URL and update the link.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@learn-build-service-prod
Copy link
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 3262fca:

✅ Validation status: passed

File Status Preview URL Details
reference/5.1/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md ✅Succeeded View (powershell-5.1)
reference/7.4/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md ✅Succeeded View (powershell-7.4)
reference/7.5/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md ✅Succeeded View (powershell-7.5)
reference/7.6/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md ✅Succeeded View (powershell-7.6)
reference/docs-conceptual/developer/format/how-to-create-a-formatting-file-format-ps1xml.md ✅Succeeded View (>=powershell-5.1)

For more details, please refer to the build report.

@surfingoldelephant surfingoldelephant changed the title Format file doc corrections .ps1xml formatting file doc corrections Dec 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant