< Back

Get-Bom

Mon Jan 13, 2020 7:16 pm

NAME Get-Bom



SYNOPSIS

Returns the name of the encoding associated with a file's BOM





SYNTAX

Get-Bom [-Path] <String> [<CommonParameters>]





DESCRIPTION

Reads the Byte Order Marking of a file to determine the file's encoding.





PARAMETERS

-Path <String>

The path to the text file being read



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





Reads the minimum number of characters from the file required to classify. Only supports unicode types.



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$isUnicode = (Get-Bom ".\\MyFile.txt") -like "utf16*"















RELATED LINKS