Skip to content

Commit

Permalink
Fix Limit URL Encoding error
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Mumenthaler <[email protected]>
  • Loading branch information
michaelmumenthaler committed Oct 6, 2022
1 parent cfab43d commit efb842b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PowerAMT/Public/Get-AMTDevice.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function Get-AMTDevice {

if(-not $Name -and -not $GUID) {
$returnArray = @()
$ResponseArray = Invoke-RestMethod -Uri ("https://" + $Global:AMTSession.Address + "/mps/api/v1/devices`$top=$Limit") -Method GET -Headers $headers
$ResponseArray = Invoke-RestMethod -Uri ("https://" + $Global:AMTSession.Address + "/mps/api/v1/devices%24top=$Limit") -Method GET -Headers $headers

foreach($Response in $ResponseArray){
$returnObject = New-Object -TypeName PSObject -Property @{
Expand All @@ -124,7 +124,7 @@ function Get-AMTDevice {

if($null -ne $Name -and $Name -ne ""){
$returnArray = @()
$ResponseArray = Invoke-RestMethod -Uri ("https://" + $Global:AMTSession.Address + "/mps/api/v1/devices?`$top=$Limit") -Method GET -Headers $headers
$ResponseArray = Invoke-RestMethod -Uri ("https://" + $Global:AMTSession.Address + "/mps/api/v1/devices?%24top=$Limit") -Method GET -Headers $headers

foreach($Response in $ResponseArray){
$returnObject = New-Object -TypeName PSObject -Property @{
Expand Down

0 comments on commit efb842b

Please sign in to comment.