Skip to content
This repository was archived by the owner on Aug 11, 2026. It is now read-only.
This repository was archived by the owner on Aug 11, 2026. It is now read-only.

Failed to import format data file #119

Description

When importing PSDocs module, importing PSDocs.Format.ps1xml may fail if PSDocs.dll is blocked by Windows because it was downloaded from the PowerShell Gallery.

Import-Module : Errors occurred while loading the format data file:
C:\Program Files\WindowsPowerShell\Modules\PSDocs\0.7.0\PSDocs.Format.ps1xml, Error at XPath
/Configuration/ViewDefinitions/View[1] in file C:\Program
Files\WindowsPowerShell\Modules\PSDocs\0.7.0\PSDocs.Format.ps1xml: A node is missing from TableControl, ListControl,
WideControl, CustomControl.
C:\Program Files\WindowsPowerShell\Modules\PSDocs\0.7.0\PSDocs.Format.ps1xml, Error at XPath
/Configuration/ViewDefinitions/View[1]/TableControl/TableHeaders in file C:\Program
Files\WindowsPowerShell\Modules\PSDocs\0.7.0\PSDocs.Format.ps1xml: The column header definition is not valid; all
headers are discarded.

C:\Program Files\WindowsPowerShell\Modules\PSDocs\0.7.0\PSDocs.Format.ps1xml, Error at XPath
/Configuration/ViewDefinitions/View[1]/TableControl/TableHeaders/TableColumnHeader[1]/Label in file C:\Program
Files\WindowsPowerShell\Modules\PSDocs\0.7.0\PSDocs.Format.ps1xml: The resource PSDocs.Resources.ViewStrings in
assembly C:\PSDocs is not found.
At line:1 char:1
+ Import-Module PSDocs.Azure
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Import-Module], RuntimeException
    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand

We should add a note for troubleshooting this issue.

It can be fixed by using Unblock-File.

For example:

Get-ChildItem -Path 'C:\Program Files\WindowsPowerShell\Modules\PSDocs\' | Unblock-File;

See issue Azure/PSDocs.Azure#25.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationAn issue or feature that affects documentation instead of code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions