Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

calculated properties windows 7 connected to windows 2012 domain

Posted on 2016-10-20
6
Medium Priority
?
36 Views
Last Modified: 2016-10-21
I am typing In the following command get-aduser username -properties memberof | select-object  {$_.memberof}  I was hoping to get the following output. For some reason I am not. I am using a windows 7 machine and have done the import-module active directory.


group1
group2
group3
group4

I was wondering why is this not occurring here.
0
Comment
Question by:techdrive
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 2000 total points
ID: 41852729
By default you get the DN of groups from memberof attribute.. To get names of group try...
Get-ADuser username -properties memberof | %{$_.memberof | Get-Adgroup | select Name}

Open in new window

Or use
Get-ADPrincipalGroupMembership username | Select Name

Open in new window

0
 

Author Comment

by:techdrive
ID: 41852739
sweet thanks it worked. So can I use this method for almost any multi valued comma delimited property. If I am using the correct terminology.
0
 
LVL 40

Expert Comment

by:Subsun
ID: 41852745
If you are trying to export result, I would suggest you to use the custom property option so you can export all required properties of user.. Example..
Get-ADuser username -properties memberof | Select Name,SamaccountName,@{N="memberof";E={$_.memberof | Get-Adgroup | select -exp Name}}

Open in new window

0
Are You Ready for GDPR?

With the GDPR deadline set for May 25, 2018, many organizations are ill-prepared due to uncertainty about the criteria for compliance. According to a recent WatchGuard survey, a staggering 37% of respondents don't even know if their organization needs to comply with GDPR. Do you?

 

Author Comment

by:techdrive
ID: 41853727
like always thank you very much for your help. You have always been extremely helpful.
0
 

Author Closing Comment

by:techdrive
ID: 41853729
very helpful
0
 
LVL 40

Expert Comment

by:Subsun
ID: 41853750
You are welcome!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here's a look at newsworthy articles and community happenings during the last month.
This process allows computer passwords to be managed and secured without using LAPS. This is an improvement on an existing process, enhanced to store password encrypted, instead of clear-text files within SQL
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question