def find_latest_dist(winrm_client, pattern):
    """Find path to newest file in dist/ directory matching a pattern."""
    res = winrm_client.execute_ps(
        """$v = Get-ChildItem -Path C:\\hgdev\\src\\dist -Filter "%s" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
$v.name"""
         % pattern)
    return res[0]
