The script used in the custom scanner is able to retrieve data and display it in the Test Script section of Delinea Secret Server (Settings>Scripts>Open the required script>Test Script) but it doesn’t appear in the Network View tab. Also, when the data returned contains about 100 records, it gets timed out in the Test Script section. The scanner timeout duration is however, set to 59 minutes.
Also noticed that the discovery doesn’t run properly and ends very quickly when triggered manually. Is this problem faced by all or am I missing something?
Trying to implement Extensible Discovery of AD users. Not using the default/OOTB discovery because it doesn’t retrieve the data in the “Name” field (Network View tab has a Name field, but the data in it comes from “SamAccountName” field of AD instead). The script returns data when testing with 5-10 records in the Test Script section of Delinea Secret Server, but when configured as a custom scanner, the data doesn’t appear in Network View tab. I am outputting the data in a PSObject format, same as the one shown in the Extensible Discovery documentation.
This is how the script looks:
#Skipping arguments
#Retrieving data from AD
$users = Get-ADUsers -Filter *
#Array to store results
$results = @()
#Going through each record and storing the "Name" field in $results array in PSObject format
foreach($user in $users)
{
#Storing user's Name in variable
$name = $user.Name
$object = New-Object –TypeName PSObject;
$object | Add-Member -MemberType NoteProperty -Name Name -Value $name;
$results += $object
}
return $results
The sequence of scanners used in the AD discovery source is:
1. Default/OOTB Active Directory OU scanner > 2. Custom AD User Scanner (made by duplicating and editing the Default/OOTB Active Directory User Accounts scanner)
PS: The discovery has to be throughout the domain so OU is not required, but Delinea requires a scanner to be present for that layer too. The script doesn’t use input from OU scanner.
r1ghteous is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.