calculated properties windows 7 connected to windows 2012 domain

Posted on 2016-10-20
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.


I was wondering why is this not occurring here.
Question by:techdrive
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
LVL 40

Accepted Solution

Subsun earned 500 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


Author Comment

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.
LVL 40

Expert Comment

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now


Author Comment

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

Author Closing Comment

ID: 41853729
very helpful
LVL 40

Expert Comment

ID: 41853750
You are welcome!

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 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