RamblingCookieMonster / RabbitMQTools

PowerShell module containing cmdlets to manage RabbitMQ.
http://ramblingcookiemonster.github.io/RabbitMQ-Intro/
MIT License
31 stars 22 forks source link

Move-RabbitMQMessage throws error #36

Closed cilerler closed 6 years ago

cilerler commented 6 years ago

usage below

    $Params = @{
        BaseUri = "http://rabbitmq.contoso.com:15672"
        Credential = $credRabbit
    }

    Move-RabbitMQMessage @params -fromQueue "q1" -toQueue "q2" -Count 100 -Verbose

throws error below

Unable to find type [System.Web.HttpUtility].
At C:\Users\...\RamblingCookieMonster\RabbitMQTools\Public\Get-RabbitMQQueueBinding.ps1:94 char:92
+ ... eUri $BaseUri $Credentials "queues/$([System.Web.HttpUtility]::UrlEnc ...
+                                          ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Web.HttpUtility:TypeName) [], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound

Unable to find type [System.Web.HttpUtility].
At C:\Users\...\RamblingCookieMonster\RabbitMQTools\Public\Get-RabbitMQQueueBinding.ps1:94 char:145
+ ... Utility]::UrlEncode($VirtualHost))/$([System.Web.HttpUtility]::UrlEnc ...
+                                          ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Web.HttpUtility:TypeName) [], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound

Based on verbose mode, it ignores the $BaseUri parameter

VERBOSE: Invoking REST API: http://localhost:15672/api/queues///bindings
VERBOSE: GET http://localhost:15672/api/queues///bindings with 0-byte payload