-
-
Notifications
You must be signed in to change notification settings - Fork 7
ConvertTo HttpQueryString
apobekiaris edited this page Sep 4, 2020
·
5 revisions
Converts a Hastable to an HttpQueryString.
ConvertTo-HttpQueryString [[-Values] <Hashtable>] [[-Variables] <String[]>] [<CommonParameters>]
Converts a Hastable to an HttpQueryString.
PS C:\> if (!$Id){
$query = ConvertTo-HttpQueryString @{
'$top' = $top
'$skip' = $Skip
reasonFilter = $Reason
statusFilter = ($Status -join ",")
resultFilter = $Result
tagFilters = ($Tag -join ",")
definitions = (($Definition|Where-Object{$_} | Get-AzDefinition).id -join ",")
}
$resource="build/builds$query"
}
Invoke-AzureRestMethod $resource @cred
Converts a hashtable into a query string and performs a web request.
{{ Fill Values Description }}
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill Variables Description }}
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
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.