question

Sop-3080 avatar image
0 Votes"
Sop-3080 asked IanXue-MSFT answered

Active Directory Mail-enabled Security group

Is there a way from me to populate ADUser Attribute (Company ) for the members of a security group using powershell.


Thanks,

windows-server-powershellwindows-active-directory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Sop-3080 avatar image
0 Votes"
Sop-3080 answered

this is what i'm working with:

get-ADGroup " GroupName" | sort -property Company | foreach { set-ADUser $_ -Company ABC}.


Is that correct?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

IanXue-MSFT avatar image
0 Votes"
IanXue-MSFT answered

Hi,

You can try this

 Get-ADGroupMember $group | Set-ADUser -Company "ABC"

Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.