Get-HtmlMetaTags
2 minute read
Get-HtmlMetaTags
SYNOPSIS
Gets all of the HTML <meta>
elements of a web page.
SYNTAX
Get-HtmlMetaTags [-ArticleUrl] <Uri> [-ShowRequiredMetadata] [<CommonParameters>]
DESCRIPTION
Gets all the HTML <meta>
elements of a web page. This can be used to see the Docs metadata in the
published article.
EXAMPLES
Example 1 - Get the ms.*
meta tags
$url = 'https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-windows'
Get-HtmlMetaTags $url | Select-Object ms.*
ms.author : sewhee
ms.date : 08/02/2021
ms.devlang : powershell
ms.prod : powershell
ms.technology : powershell-conceptual
ms.tgt_pltfr : windows, macos, linux
ms.topic : conceptual
Example 2 - Show only the require metadata
$url = 'https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-windows'
Get-HtmlMetaTags $url -ShowRequiredMetadata
title :
og:title : Installing PowerShell on Windows - PowerShell
description : Information about installing PowerShell on Windows
ms.manager :
ms.author : sewhee
author : sdwheeler
ms.service :
ms.date : 08/02/2021
ms.topic : conceptual
ms.subservice :
ms.prod : powershell
ms.technology : powershell-conceptual
ms.custom :
ROBOTS : INDEX, FOLLOW
PARAMETERS
-ArticleUrl
The URL to the Docs article you want to inspect.
Type: System.Uri
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ShowRequiredMetadata
Filters the output to show only the metadata require by the OPS publishing system.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
None
OUTPUTS
System.Object
NOTES
RELATED LINKS
Last modified March 17, 2023: (MAINT) Conform MicrosoftDocs module (b2f71ed)