How to Get File Extension in PowerShell - Code Snippet

How to perform 'Get File Extension' in PowerShell.

example.ps1
# Task: Get File Extension
# Language: PowerShell

function get_file_extension() {
    # Implementation for Get File Extension
    $ result = ...; # Initialize variable
    # TODO: Implement core logic here
    # Step 1: Prepare data
    # Step 2: Process Get File Extension
    Write-Host("Done");
}
AdSense Slot