Export Attributes of Users

This topic contains 2 replies, has 3 voices, and was last updated by  James Haynes 1 month, 4 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts

  • duongtn34
    Member
    #167716

    Good morning
    I want to export to csv file all the used attributes of users in a a specific group .
    Now when i run the cmdlet get-adgroupmember it gives me all the users but not all the used attributes. Also there is no -properties parameter to this cmdlet.
    Thanks
    Elad


    Ossian
    Moderator
    #192120

    This may be better in the PowerShell forum, but I’ll leave it here to see how it develops.

    Practice your PowerShell pipelining along the lines of get-adgroupmember | get-aduser -filter * -Properties * | Get-member -membertype property

    I have shamelessly nicked that from a :google: search so be aware I have not checked the exact syntax or results


    James Haynes
    Member
    #252142

    you could try something like:

    Get-ADGroupMember -identity $($group.name) -recursive | %{Get-ADUser $_ -property displayname} | Select samaccountname,displayname | Export-CSV “C:Tempuser list.csv”
    [/CODE]

    just take the output you have that works and pipe it into the next request to end up with the attributes you are looking for. granted you will need to add the attribute handles in the above, but should work. [CODE]Get-ADGroupMember -identity $($group.name) -recursive | %{Get-ADUser $_ -property displayname} | Select samaccountname,displayname | Export-CSV “C:Tempuser list.csv”
    [/CODE]

    just take the output you have that works and pipe it into the next request to end up with the attributes you are looking for. granted you will need to add the attribute handles in the above, but should work.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.