Solved

calculated properties windows 7 connected to windows 2012 domain

Posted on 2016-10-20
6
28 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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AD user profile  integration 5 24
Bind Mac To Azure AD 1 32
Problem to setup GUI 11 33
Can not remove Old Primary Domain controller 7 53
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

810 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