external help file | Module Name | ms.date | online version | schema |
---|---|---|---|---|
DocumentWMI-help.xml |
DocumentWMI |
06/05/2021 |
2.0.0 |
Creates help documentation for WMI classes in structured markdown files.
New-WmiHelp [[-Namespace] <string>] [[-OutputPath] <string>] [-TargetClass <string>]
[-Metadata <hashtable>] [-CreateValueTables] [-IncludeInventoryClasses] [-IncludePropertyTable]
Creates help documentation for WMI classes in structured markdown files. By default, this cmdlet creates markdown files for each WMI class and its methods within the target namespace. Optionally, you can target a specific class using the TargetClass parameter.
The cmdlet creates the markdown files using the following name patterns:
<classname>.md
<classname>-<methodname>-method.md
New-WmiHelp -TargetClass Win32_OperatingSystem
dir Win32_OperatingSystem*
Directory: C:\temp\WMIDocs
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 6/5/2021 2:23 PM 1328 win32_operatingsystem-reboot-method.md
-a--- 6/5/2021 2:23 PM 1407 win32_operatingsystem-setdatetime-method.md
-a--- 6/5/2021 2:23 PM 1458 win32_operatingsystem-shutdown-method.md
-a--- 6/5/2021 2:23 PM 1913 win32_operatingsystem-win32shutdown-method.md
-a--- 6/5/2021 2:23 PM 2511 win32_operatingsystem-win32shutdowntracker-method.md
-a--- 6/5/2021 2:23 PM 25140 win32_operatingsystem.md
$meta = @{
titleSuffix = 'Win32 Classes'
'ms.prod' = 'Windows Server'
'ms.technology' = ''
'ms.topic' = 'reference'
author = 'aczechowski'
'ms.author' = 'aaroncz'
'manager' = 'dougeby'
}
New-WmiHelp -TargetClass Win32_ComputerSystem -Metadata $meta
When this parameter is provided, value-type qualifiers are displayed as tables or lists. The supported value types are:
- Values
- ValueMap
- BitValues
- BitMap
- Enumeration
- Bits
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
By default, this cmdlet does not output documentation for SCCM inventory classes. Using this parameter includes the inventory classes.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
When this parameter is used, the cmdlet creates a hyperlinked list of property names for the class.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Use this to pass a hash table of metadata key/value pairs. This metadata is written as YAML frontmatter in every markdown file. By default, the cmdlet creates the following metadata:
- description
- ms.date
- title
Type: System.Collections.Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the WMI namespace to be documented. The default namespace is root\cimv2
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: Root\cimv2
Accept pipeline input: False
Accept wildcard characters: False
Specifies the folder location to write the markdown files. Default location is the current folder.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: .\
Accept pipeline input: False
Accept wildcard characters: False
Specifies the WMI class to document. The class must exist within the target namespace.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
The cmdlet write output to the host (not the pipeline) to show progress.