View File Content Feature is Available on the Gallery

Yuting Chen

We are excited to let you know that you can now view files and their contents directly from the PowerShellGallery!

We have received a lot of feedback that you want to see the file contents in the items and scripts before downloading them, so we enabled browsing item content on the Gallery.

This feature includes two parts: listing the files within the item, and displaying file contents for supported file types. Currently we support displaying the contents of the following file extensions: .ps1, .psm1, .psd1, .ps1xml, .xml and .txt.


Listing the Files in the Item/Script

On the item details page you can find the section header “FileList”, and in the default view, you will see “Show” immediately below it. Clicking on “Show” will expand the complete list of files contained in the item. Similarly, clicking on “Hide” will collapse the list of files in the item.




Displaying the Contents of Files

Each supported file type is displayed as a hyperlink, and clicking it will take you to a new page with file contents displayed in PowerShell syntax highlighting. Clicking on the title or the version of the item, which is displayed at the top of the screen, will bring you back to item detail page.




The displaying panel has a scrollable horizontal bar, so you can just drag and scroll to view contents.


We plan to add support for the following extensions in upcoming releases.:

  • .psc1 (Console file)
  • .pssc (Session Configuration File)
  • .cdxml (Cmdlet Definition XML Document)
  • .psrc (Role Capability File)
  • .mof (Managed Object Format (MOF) file)
  • .mfl (MFL file)
  • .JSON (ARM templates)
  • .XAML (PowerShell Workflows)


Check out PowerShell Gallery and find out more about this feature.

If you have any comments or questions, please let us know. You can submit feature requests or issues in UserVoice.


Yuting Chen

Software Engineer

Windows PowerShell Team


Discussion is closed.

Feedback usabilla icon