Please feel free to provide feedback or file bugs here.

PowerShell should have a cmdlet that supports best effort magic number parsing on files without extensions or incorrect extensions

Votes from Connect: 4

Original Date Submitted: 4/14/2015 8:18:28 AM

********Contact Information********
Handle: JasonHorner
Site Name: PowerShell
Feedback ID: 1246396

Problem Description:
often we need to parse a file and not rely on its extension, while magic number parsing is imperfect it can provide some value.
this could be used for general file parsing as well as some security scenarios

Here is a script that implements this feature though I don't think it is completely robust:

unix support a similar capability via the file utility:

More info on magic number parsing:

Product Studio item created by Connect Synchronizer due to creation of feedback ID 1246396 (

Repro Steps:

Internal BugId: 14377

1 vote
Sign in
Sign in with: Facebook Google
Signed in as (Sign out)

We’ll send you updates on this idea

AdminJoey Aiello [MSFT] (Program Manager, Windows Server) shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Sign in with: Facebook Google
Signed in as (Sign out)

Feedback and Knowledge Base