0 votes

Hi,

I am running a report to dump some attributes. I have one attribute that is Yes or No in AD.

I want to transform that when generating that in a report.

<br>

AD value Report output value
Yes True
No False

How can do I this? I believe it is script in a report -specific column but not sure how to construct.

Thanks.

by (240 points)
0

Thanks, this accomplished what I needed.

A follow up question, how would I look up Disabled account and reference property to some similar transforms?

I thought of using adm-VirtualColumnDisabled but that is a caluculated value.

1 Answer

0 votes
by (226k points)

Hello,

Yes, you are right. It can only be done using a report-specific column. For details on working with columns, have a look at section Report-Specific Columns of the following tutorial: https://www.adaxes.com/tutorials_ActiveDirectoryManagement_CreateReport.htm#collapse3. In your case, the column should be of Text type and generated by the below script. In the script, the $propertyName variable specifies the LDAP name of the Boolean property (e.g. adm-CustomAttributeBoolean1) whose values will be displayed in the report column.

$propertyName = "adm-CustomAttributeBoolean1" # TODO: modify me

# Get property value
$object = $Context.GetADObject()
try
{
    $propertyValue = $object.Get($propertyName)
}
catch
{
    $columnValue = $NULL
}

# Set column value
if ($propertyValue -eq $False)
{
    $columnValue = "False"
}
elseif ($propertyValue -eq $True)
{
    $columnValue = "True"
}

$Context.Value = $columnValue

If your report is generated by a script, it is recommended to generate report-specific column values in the script itself. For details, have a look at section Setting values for custom columns of the following SDK article: http://adaxes.com/sdk/GeneratingReports/#setting-values-for-custom-columns.

Related questions

+1 vote
1 answer

I see many questions regarding this in the Forum, and last solution is from 2014 - based on custom PS script, has something in the product come up that solves this ... outputs users that does not comply to property pattern in order to upkeep AD sanity. Thanks

asked Jan 21, 2021 by spinnetho (50 points)
0 votes
1 answer

I had a script that would copy the values from adm-CustomAttributeTextMultiValue1 and save them into extensionAttribute15 as a comma seperated list. The script somehow got deleted and I can't seem to find the tutorial I used to create it before.

asked Jul 1 by jordan (110 points)
0 votes
0 answers

Hey Guys We have some issues with new meeting rooms that we have created. Previously we used to have on-premise exchange but switched to office365. Before doing ... OU but the interface are different. under exchange properties they are different aswell.

asked Sep 18, 2019 by seanr (70 points)
0 votes
1 answer

The built in functionality to convert exchange online mailboxes to shared does not work for users that are synced from our local AD via Azure AD connect. How can we over ... account to in cloud from synced with AD all our issues with this would be resolved.

asked Jul 31, 2019 by john.morrow (250 points)
0 votes
1 answer

Hi Any easy way to convert the ObjectGUID we get from: $TheGUID = (Get-AdmGroup -Identity $SomeObject -Server $SomeServer).ObjectGUID so that we can store them on the current ... We have tried some convert examples from Internet, but they do not work. - Thanks

asked Nov 16, 2018 by Boxx.dk (2.6k points)
2,779 questions
2,512 answers
6,574 comments
25,746 users