Get-FileMetaData - Remove Unicode Characters from Output
I was looking for a way to read image file Metadata, and after some research, I came across this article on Microsoft's website. Use PowerShell to Find Metadata from Photograph Files«.
However, there was one issue with this code. It was no longer available to download on their website.
After a quick Google Search, I found this code.Get-FileMetaData« which worked liked a charm.
(I have submitted my fix to the link above so the developer can add it to the existing file, but I will also add it here.)
After installing the Module and importing it into PowerShell, I ran it against one of my images. It displayed all the Metadata you needed, except it had these strange characters around the output.
Steps to Import and Use This Module.
  1. Open your favorite Text Editor as [Administrator].
  2. Copy the Code in [Section 2a] below and paste it into your Editor.
  3. Save the file as Get-FileMetaData.psm1
    Copy
    Search Site
    Search Google
    to the following locations, with the folder name matching the filename Get-FileMetaData
    Copy
    Search Site
    Search Google
    .
    C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Get-FileMetaData\Get-FileMetaData.psm1
    Copy
    Search Site
    Search Google

    C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\Get-FileMetaData\Get-FileMetaData.psm1
    Copy
    Search Site
    Search Google

    The file and folder names must be identical for PowerShell to recognize them.
[Section 2a]
[PowerShell - Get-FileMetaData]
CFFCS | CarrzSynEdit: | PS (PowerShell)

# based on https://gallery.technet.microsoft.com/scriptcenter/Get-FileMetaData-3a7ddea7


function Get-FileMetaData 
{ 
    <# 
    .SYNOPSIS 
        Get-FileMetaData returns metadata information about a single file. 
 
    .DESCRIPTION 
        This function returns all metadata for a specific file. It can be used to access the information stored in the filesystem. 
    
    .EXAMPLE 
        Get-FileMetaData -File "c:\temp\image.jpg" 
 
        Get information about an image file. 
 
    .EXAMPLE 
        Get-FileMetaData -File "c:\temp\image.jpg" | Select Dimensions 
 
        Show the dimensions of the image. 
 
    .EXAMPLE 
        Get-ChildItem -Path .\ -Filter *.exe | foreach {Get-FileMetaData -File $_.Name | Select Name,"File version"} 
 
        Show the file version of all binary files in the current folder. 
    #> 
 
    param([Parameter(Mandatory=)][string]$File = $(throw "Parameter -File is required.")) 
 
    if(!(Test-Path -Path $File)) 
    { 
        throw "File does not exist right now System32: $File" 
        Exit 1 
    } 
 
    $tmp = Get-ChildItem $File 
    $pathname = $tmp.DirectoryName 
    $filename = $tmp.Name 
 
    $hash = @{}
    try{
        $shellobj = New-Object -ComObject Shell.Application 
        $folderobj = $shellobj.namespace($pathname) 
        $fileobj = $folderobj.parsename($filename) 
        
        for($i=0; $i -le 294; $i++) 
        { 
            $name = $folderobj.getDetailsOf($null, $i);
            if($name){
                $value = $folderobj.getDetailsOf($fileobj, $i);
                if($value){
                    #$hash[$($name)] = $($value)

                    #Added on Apr 5, 2025, 7:50 AM EDT by Wayne Barron (carrzkiss)

                    $hash[$($name)] = $($value) -replace "\u200E","" -replace "\u200F",""
                }
            }
        } 
    }finally{
        if($shellobj){
            [System.Runtime.InteropServices.Marshal]::ReleaseComObject([System.__ComObject]$shellobj) | out-null
        }
    }

    return New-Object PSObject -Property $hash
} 
Export-ModuleMember -Function Get-FileMetadata

Video lesson on using the module.
Importing and what to do.