public/Get/Get-ImportedISETheme.ps1

function Get-ImportedISETheme {
    <#
    .SYNOPSIS
        Returns all imported PowerShell ISE themes from the registry.
 
    .DESCRIPTION
        The Get-ImportedISETheme function retrieves user-defined themes from the ISE theme registry path.
        Each theme is returned as an object containing its name and the associated XML content.
 
    .EXAMPLE
        PS C:\> $Themes = Get-ImportedISETheme
 
        Retrieves all imported ISE themes and stores them in the $Themes variable.
 
    .NOTES
        Author: Jeff Pollock
        GitHub: https://github.com/phriendx/ISEColorTheme.cmdlets
        Website: https://pxlabs.info
    #>


    [CmdletBinding()]
    param()

    $regPath = 'HKey_Current_User\Software\Microsoft\PowerShell\3\Hosts\PowerShellISE\ColorThemes'

    if (-not (Test-Path "Registry::$regPath")) {
        Write-Warning "No imported themes found in registry."
        return
    }

    $themeNames = (Get-Item -Path "Registry::$regPath").Property

    foreach ($themeName in $themeNames) {
        $xml = (Get-ItemPropertyValue -Path registry::$regPath -Name $themeName)
        [pscustomobject]@{
            ThemeName = $themeName
            XML       = $xml
        }
    }
}