CheckForDuplicatedDevice

Modified on Fri, 17 Nov 2023 at 01:49 PM

Check if there are any other devices with displayname ending in the given substring. Return true if any were found.

For ease of use, you need to import the Console-API-Module.

All documentation can also be seen in the API Module.

 


Parameter:Description:
uri


string, optional
web Service URL
e.g.: http://coreservername/five9sWS/five9sWS.asmx
pat

string, mandatory
the Personal Access Token
computerIdn  

integer, mandatory
Idn of current computer, to skip this parameter provide negative idn
substringToSearch 

string, mandatory
the (sub)string (end with) of the hostname to search for
 

Get started with the following PowerShell:
Import-Module $PSScriptRoot\Console-API-Module.psm1 -Verbose -Force #you need to execute this line once, so that powershell can offer intelliSense support

# Arrange the parameters
$wsdlUrl = "http://coreserver/five9sWS.asmx?wsdl" # web service URL, you need to replace the 'coreserver' with your actual value
$pat = "879067F0F16_YourPatHere_024214A4"
$substringToSearch = "WinVM0815"
$computerIdn = -9999

# Action
Invoke-CheckForDuplicatedDevice -uri $wsdlUrl -pat $pat -computerIdn $computerIdn -substringToSearch $substringToSearch

The result from the request will either be a True or False.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article