GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Calculated properties passed to ConvertTo-Html do not support the "n" / "name" key · Issue #6994 · PowerShell/PowerShell

Calculated properties passed to ConvertTo-Html do not support the "n" / "name" key #6994

New issue
Copy link
New issue
Copy link
Closed
#8426
Closed
Calculated properties passed to ConvertTo-Html do not support the "n" / "name" key#6994
#8426
Copy link
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdletsgeneral cmdlet issuesgeneral cmdlet issues

Description

@mklement0
Michael Klement (mklement0)
opened on Jun 4, 2018
Issue body actions

Note: This is merely an inconsistency with other cmdlets that support calculated properties, such as Select-Object, where n / name and l / label can be used interchangeably to name a property.

ConvertTo-Html only supports l / label.

Steps to reproduce

'one' | Select-Object @{ n='Name'; e={ $_ } }
'one' | ConvertTo-Html -Property @{ n='Name'; e={ $_ } }

Expected behavior

Name
----
one

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HTML TABLE</title>
</head><body>
<table>
<colgroup><col/></colgroup>
<tr><th>Name</th></tr>
<tr><td>one</td></tr>
</table>
</body></html>

Actual behavior


Name
----
one

ConvertTo-Html : The n key is not valid.

Environment data

PowerShell Core v6.1.0-preview.2 on macOS 10.13.4
PowerShell Core v6.1.0-preview.2 on Ubuntu 16.04.4 LTS
PowerShell Core v6.1.0-preview.2 on Microsoft Windows 10 Pro (64-bit; Version 1709, OS Build: 16299.371)
Windows PowerShell v5.1.17134.48 on Microsoft Windows 10 Pro (64-bit; Version 1709, OS Build: 16299.371)

Activity

  1. Ilya (iSazonov)
    added
    Area-Cmdlets-Utility
    on Jun 5, 2018
  2. iSazonov commented on Jun 5, 2018

    @iSazonov
    Ilya (iSazonov)
    on Jun 5, 2018
    Collaborator
    More actions

    /cc Bruce Payette (@BrucePay)

  3. Michael Klement (mklement0)
    added a commit that references this issue on Dec 8, 2018

    Fixes PowerShell#6994

    This issue will close once commit f0e5ada is merged into the 'master' branch.
    f0e5ada
  4. Ilya (iSazonov)
    added
    Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bug
    on Jan 8, 2019
  5. Aditya Patwardhan (adityapatwardhan)
    closed this as completedin #8426on Jan 18, 2019
  6. Ilya (iSazonov)
    added
    Resolution-FixedThe issue is fixed.The issue is fixed.
    on Jan 18, 2019
  7. Ryan Yates (kilasuit)
    added
    WG-Cmdletsgeneral cmdlet issuesgeneral cmdlet issues
    and removed
    WG-Cmdlets-Utility
    on Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdletsgeneral cmdlet issuesgeneral cmdlet issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.