• ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
The HP Community is where owners of HP products, like you, volunteer to help each other find solutions.
HP Recommended

Hi Team! 

 

I'm new here, so sorry if this is an old topic.

 

I started to create an script to collect the Content Box (Visual+) using the RESTAPI and PowerShell (Invoke-RestMethod)

 

I know that the information for the Visual+ will be at the "mr.pair.uid.1". but I could not find any URL that provides me this info... 

 

Here is what I got so far:

$username = "Polycom"
$password = "0000" | ConvertTo-SecureString -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($username,$password)

add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;

public class IDontCarePolicy : ICertificatePolicy {
public IDontCarePolicy() {}
public bool CheckValidationResult(
ServicePoint sPoint, X509Certificate cert,
WebRequest wRequest, int certProb) {
return true;
}
}
"@
[System.Net.ServicePointManager]::CertificatePolicy = new-object IDontCarePolicy
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls11
$IP = "172.16.182.127"
$Path = "api/v2/mgmt/device/info"
$URL = "http://$($IP)/$($Path)"
$InvokeData = Invoke-RestMethod -Method Get -Uri $URL -Credential $Cred
$data = $InvokeData.data
$data
2 REPLIES 2
HP Recommended

 It took some time but I got it 🙂

 

 

 

 

$IP = "10.1.1.36" 
$PW = "0000"
$Config = "mr.pair.uid.1"

# Output Object
$Output = New-Object PSObject

$Password = $PW | ConvertTo-SecureString -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential("Polycom",$Password)

$URL = "http://$($IP)/api/v1/mgmt/config/get"

$Body = @{
    "data" = @(
        $Config
    )
}
$Json = $Body | ConvertTo-Json
$Invoke = Invoke-RestMethod -Method Post -Uri $URL -Credential $cred -TimeoutSec 8 -Body $Json -ContentType "application/json" -ErrorAction SilentlyContinue
if($Invoke.InvalidParams -like $null){
    $Output | Add-Member -type NoteProperty   -name $Config -value (($Invoke.Data).$Config).Value
    $Output | Add-Member -type NoteProperty   -name "Source" -value (($Invoke.Data).$Config).Source
}
else{
    $Output | Add-Member -type NoteProperty   -name $Config -value "Invalid Config Parameter"
}

$Output 

 

 

 

 

 

I hope that this helps others 🙂 🙂

 

I also removed the part for the HTTPS connection:

 

 

 

 

add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;

public class IDontCarePolicy : ICertificatePolicy {
public IDontCarePolicy() {}
public bool CheckValidationResult(
ServicePoint sPoint, X509Certificate cert,
WebRequest wRequest, int certProb) {
return true;
}
}
"@
[System.Net.ServicePointManager]::CertificatePolicy = new-object IDontCarePolicy
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls11

 

 

 

 

HP Recommended

Hello @Diego_A  and all,

 

we figured out there is an actual REST API command to get this info.

 

Example for CURL:

curl -k -X GET -H "Content-Type: application/JSON" https://Polycom:789456@10.252.149.59/api/v1/mgmt/mrpair/info

 

The above will respond with:

{"data": {"PairedDeviceList": [{"deviceUid": "00e0db48c130", "hardwareType": "VideoCodec", "hardwareModel": "RealPresence Group 500"}], "mrUid": "0004f2fd088c", "mrStatus": "Hub", "ConnectedDeviceList": [{"hardwareVer": "20", "mrProtocolMinor": 0, "deviceUid": "00e0db48c130", "mrIpAddress": "10.252.149.102", "mrProtocolMajor": 1, "mrPort": 18888, "connectionUpTime": 44475, "softwareRelease": "Release - 6.2.2.6-650033", "softwareDate": "2021-03-04 15:49:39-0600", "hardwareModel": "RealPresence Group 500", "ComponentList": [{"componentName": "TV UI", "componentUri": "tvui", "componentProtocolVer": "1.0", "componentType": "displayUI", "componentSerialNumber": "", "componentDetail": "", "componentVersion": ""}, {"componentName": "Group Series Content in", "componentUri": "mrCI0", "componentProtocolVer": "1.0", "componentType": "ContentInput", "componentSerialNumber": "", "componentDetail": "", "componentVersion": ""}, {"componentName": "Group Series Display", "componentUri": "mrDisplay1", "componentProtocolVer": "1.0", "componentType": "displaySink", "componentSerialNumber": "", "componentDetail": "", "componentVersion": ""}, {"componentName": "GS LEDs", "componentUri": "mrGSLedC", "componentProtocolVer": "1.0", "componentType": "led", "componentSerialNumber": "", "componentDetail": "", "componentVersion": ""}, {"componentName": "gsPTP", "componentUri": "mrPtp", "componentProtocolVer": "1.0", "componentType": "ptpControl", "componentSerialNumber": "", "componentDetail": "", "componentVersion": ""}, {"componentName": "GS system component", "componentUri": "system", "componentProtocolVer": "1.0", "componentType": "system", "componentSerialNumber": "8G180248C130CV", "componentDetail": "", "componentVersion": ""}, {"componentName": "Group Series Audio", "componentUri": "mrAudio", "componentProtocolVer": "1.0", "componentType": "audioSrcSink", "componentSerialNumber": "", "componentDetail": "Local-HDMI", "componentVersion": ""}, {"componentName": "Group Series EagleEye Camera", "componentUri": "mrCam0", "componentProtocolVer": "1.0", "componentType": "cameraSrc", "componentSerialNumber": "", "componentDetail": "", "componentVersion": "HDCI-MPTZ_EEP"}]}]}, "Status": "2000"}

Please ensure to provide some feedback if this reply has helped you so other users can profit from your experience.

Best Regards

Steffen Baier

------------------------------------------------
Notice: I am an HP Poly employee but all replies within the community are done as a volunteer outside of my day role. This community forum is not an official HP Poly support resource, thus responses from HP Poly employees, partners, and customers alike are best-effort in attempts to share learned knowledge.
If you need immediate and/or official assistance for former Poly\Plantronics\Polycom please open a service ticket through your support channels
For HP products please check HP Support.

Please also ensure you always check the General VoIP , Video Endpoint , UC Platform (Microsoft) , PSTN
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.