GithubHelp home page GithubHelp logo

Comments (4)

adamrushuk avatar adamrushuk commented on August 21, 2024

If you just want to get the SamAccountName and MemberOf user properties, this should work for you:

$additionalUserProperties = 'MemberOf'  
$adUsers = Get-ADUser -Filter * -Properties $additionalUserProperties
$adUsers | Select-Object -Property 'SamAccountName', $additionalUserProperties

The MemberOf property is not returned by default, so you will have to request additional properties, eg: $additionalUserProperties = 'MemberOf', 'OtherProperty1', 'OtherProperty2'

Hope that helps :)

from invoke-parallel.

amolsp777 avatar amolsp777 commented on August 21, 2024

If you just want to get the SamAccountName and MemberOf user properties, this should work for you:

$additionalUserProperties = 'MemberOf'  
$adUsers = Get-ADUser -Filter * -Properties $additionalUserProperties
$adUsers | Select-Object -Property 'SamAccountName', $additionalUserProperties

The MemberOf property is not returned by default, so you will have to request additional properties, eg: $additionalUserProperties = 'MemberOf', 'OtherProperty1', 'OtherProperty2'

Hope that helps :)

Thanks for the update but I was looking to run this in parallel if I want to try for Get-adgroup and get the associated member's details so foreach takes time to calculate so want to check if I can run this to get information for each group parallelly.

from invoke-parallel.

adamrushuk avatar adamrushuk commented on August 21, 2024

Oh I see.
Can you share your example code you have so far?
If not, can you share your pseudo-code?

from invoke-parallel.

amolsp777 avatar amolsp777 commented on August 21, 2024

Somehow i figured it out but i used maxqueue as 1, because if I put more then 1 it is not fetching detailed information for some groups (not complete within that time).
Not sure if I am using the correct combination of Invoke-Parallel syntaxes.

By using maxqueue value 1, it is also almost slow, but getting accurate data.

Adding my code, how I figured it out and how I am using it, but might be there is better way to use this so need experts advise :)

attaching file.
GroupMembersCheck_ps1.txt

from invoke-parallel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.