Solved

calculated properties windows 7 connected to windows 2012 domain

Posted on 2016-10-20
6
21 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
  • 3
  • 3
6 Comments
 
LVL 40

Accepted Solution

by:
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

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Set OWA language and time zone in Exchange for individuals, all users or per database.
In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now