-
Notifications
You must be signed in to change notification settings - Fork 0
Get PropertyHashFromListOutput
Converts line-oriented native output into a property hashtable.
Get-PropertyHashFromListOutput -Output <Object> [-Regex <Regex>] [-AllowedPropertyName <String[]>]
[-AddExtraPropertiesAsKey <String>] [-ErrorHandling <ScriptBlock>]
[<CommonParameters>]
Get-PropertyHashFromListOutput -Output <Object> [-Regex <Regex>] [-AllowedPropertyName <String[]>]
[-DiscardExtraProperties] [-ErrorHandling <ScriptBlock>]
[<CommonParameters>]
Parses lines containing named property and value groups, normalizes property names, appends continuation lines, and routes redirected standard-error records to a caller-provided handler.
'Name: PowerShell', 'Version: 7.6' |
Get-PropertyHashFromListOutput
Returns a hashtable containing Name and Version.
Specifies the nested hashtable key used for properties that are not in AllowedPropertyName.
Type: String
Parameter Sets: AddExtraPropertiesUnderKey
Aliases:
Required: False
Position: Named
Default value: ExtraProperties
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies property names to retain at the top level. The default '*' accepts every parsed property.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: *
Accept pipeline input: False
Accept wildcard characters: FalseDiscards parsed properties that are not listed in AllowedPropertyName.
Type: SwitchParameter
Parameter Sets: DiscardExtraProperties
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: FalseSpecifies the script block that receives redirected standard-error records.
Type: ScriptBlock
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: { Write-Error $_ }
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies one or more native-command output lines or error records.
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: FalseSpecifies the regular expression used to capture named property and
val groups.
Type: Regex
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: ^\s*(?<property>[\w-\s]*):\s*(?<val>.*)
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.