ConvertTo-QueryString¶
SYNOPSIS¶
Convert an object to a query string
SYNTAX¶
ConvertTo-QueryString [-InputObject] <Object> [-AsURLEncoded] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
DESCRIPTION¶
Convert an object to a query string
EXAMPLES¶
EXAMPLE 1¶
ConvertTo-QueryString -InputObject @{a=1;b=2}
?a=1&b=2
EXAMPLE 2¶
ConvertTo-QueryString -InputObject @{a='this is value of a';b='valueOfB'}
?a=this%20is%20value%20of%20a&b=valueOfB
EXAMPLE 3¶
ConvertTo-QueryString -InputObject @{a='this is value of a';b='valueOfB'} -AsURLEncoded
?a=this+is+value+of+a&b=valueOfB
PARAMETERS¶
-InputObject¶
{{ Fill InputObject Description }}
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-AsURLEncoded¶
{{ Fill AsURLEncoded Description }}
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction¶
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
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.