Share via


Need to set 2 attributes added for exchange in AD group using PowerShell

Question

Thursday, November 2, 2017 5:13 PM

Hello,

I want to set ReportToOriginator as True and ReportToOwner as False for almost 2000+ groups. I tried using below but it failed with incorrect parameter error

Set-ADObject '<My Group DN>' -ADD @{reportToOriginator='True'; ReportToOwner='False'}

Set-Adgroup -Identity '<My Group DN>' -ADD @{reportToOriginator:$true}

But nothing worked. It just gives error.

Can anyone please guide me with correct cmdlets?

Regards,

Abhay

All replies (3)

Thursday, November 2, 2017 5:42 PM ✅Answered

Do those attributes actually exist in your schema?

Set-Adgroup testgrp2 -ADD @{reportToOriginator=$true; ReportToOwner=$false}

Syntax!

\(ツ)_/


Friday, November 3, 2017 10:36 AM

Yes, attributes do exist as they are set to True for some groups.

I will try this and post results.

Abhay


Friday, November 3, 2017 10:39 AM

It worked:-)... Many thanks.

Abhay