Dela via


Measure-PlatyPSMarkdown

Avgör typen av Markdown-fil.

Syntax

Path (Standard)

Measure-PlatyPSMarkdown
    [-Path] <string[]>
    [<CommonParameters>]

LiteralPath

Measure-PlatyPSMarkdown
    -LiteralPath <string[]>
    [<CommonParameters>]

Description

Kommandot läser innehållet i filen och avgör typen av innehåll. Kommandot returnerar ett PlatyPSMarkdown- objekt som innehåller innehållstypen och schemaversionen av en PlatyPS-markdown-fil. Det här är användbart för att bara välja de filer som innehåller CommandHelp eller ModuleHelp innehåll.

Exempel

Exempel 1 – Mäta alla Markdown-filer i en mapp

Measure-PlatyPSMarkdown -Path .\v2\Microsoft.PowerShell.PlatyPS\*.md
Title                               Filetype              Filepath
-----                               --------              --------
Compare-CommandHelp                 CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Compare-CommandHelp.md
Export-MamlCommandHelp              CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Export-MamlCommandHelp.md
Export-MarkdownCommandHelp          CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Export-MarkdownCommandHelp.md
Export-MarkdownModuleFile           CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Export-MarkdownModuleFile.md
Export-YamlCommandHelp              CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Export-YamlCommandHelp.md
Export-YamlModuleFile               CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Export-YamlModuleFile.md
Import-MamlHelp                     CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Import-MamlHelp.md
Import-MarkdownCommandHelp          CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Import-MarkdownCommandHelp.md
Import-MarkdownModuleFile           CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Import-MarkdownModuleFile.md
Import-YamlCommandHelp              CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Import-YamlCommandHelp.md
Import-YamlModuleFile               CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Import-YamlModuleFile.md
Measure-PlatyPSMarkdown             CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Measure-PlatyPSMarkdown.md
Microsoft.PowerShell.PlatyPS Module ModuleFile, V2Schema  D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Microsoft.PowerShell.PlatyPS.md
New-CommandHelp                     CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\New-CommandHelp.md
New-MarkdownCommandHelp             CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\New-MarkdownCommandHelp.md
New-MarkdownModuleFile              CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\New-MarkdownModuleFile.md
Test-MarkdownCommandHelp            CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Test-MarkdownCommandHelp.md
Update-CommandHelp                  CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Update-CommandHelp.md
Update-MarkdownCommandHelp          CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Update-MarkdownCommandHelp.md
Update-MarkdownModuleFile           CommandHelp, V2Schema D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Update-MarkdownModuleFile.md

Parametrar

-LiteralPath

Anger en sökväg till en eller flera Markdown-filer. Värdet för LiteralPath- används exakt som det skrivs. Inga tecken tolkas som wildcards. Om sökvägen innehåller escape-tecken omger du den med enkla citattecken. Enkla citattecken gör att PowerShell inte tolkar några tecken som escape-sekvenser.

Mer information finns i about_Quoting_Rules.

Parameteregenskaper

Typ:

String[]

Standardvärde:None
Stöder jokertecken:False
DontShow:False
Alias:PSPath, SP

Parameteruppsättningar

LiteralPath
Position:Named
Obligatorisk:True
Värde från pipeline:True
Värde från pipeline efter egenskapsnamn:False
Värde från återstående argument:False

-Path

Sökvägen till en eller flera Markdown-filer. Anger en sökväg till en eller flera platser.

Parameteregenskaper

Typ:

String[]

Standardvärde:None
Stöder jokertecken:True
DontShow:False

Parameteruppsättningar

Path
Position:0
Obligatorisk:True
Värde från pipeline:True
Värde från pipeline efter egenskapsnamn:False
Värde från återstående argument:False

CommonParameters

Den här cmdleten stöder vanliga parametrar: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction och -WarningVariable. Mer information finns i about_CommonParameters.

Indata

String

Utdata

Microsoft.PowerShell.PlatyPS.MarkdownProbeInfo

Kommentarer

För gamla markdown-formatfiler undersöker kommandot frontmatter- och H2-strukturen för att fastställa innehållstypen. För nya markdown-formatfiler undersöker kommandot den document type nyckeln i frontmattern.

Kommandot verifierar inte markdown-filens fullständiga struktur. Använd Test-MarkdownCommandHelp för att verifiera markdown-filens struktur.