0 votes


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.


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.


by (240 points)

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 (220k points)


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()
    $propertyValue = $object.Get($propertyName)
    $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
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)
0 votes
1 answer

Is it possible to visually convert the computer property associated with the Local Administrator Expiration Date "ms-Mcs-AdmPwdExpirationTime" from an integer to a more readable date ... on the fly when the property is displayed in the web interface. Thanks!

asked Aug 16, 2016 by VTPatsFan (610 points)
2,740 questions
2,474 answers
1,366,212 users