Comments (4)
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.
If you just want to get the
SamAccountName
andMemberOf
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.
Oh I see.
Can you share your example code you have so far?
If not, can you share your pseudo-code?
from invoke-parallel.
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)
- NullReferenceException HOT 1
- Physical Memory usage HOT 2
- Log file locks if multiple scripts invoke-parallel HOT 4
- Get-RunspaceData error: Collection was modified; enumeration operation may not execute HOT 1
- it is not working to get AD group member using Get-ADGroupMember HOT 1
- Get-RunspaceData : ERROR: Deployment failed HOT 2
- Invoke-Parallel: When launched within a function, does not carry param()-variables forward
- Invoke-Parallel Scriptblock [Enviornment]::GetEnvironmentVariable
- Using a shared & synchronized variable to hold a counter HOT 2
- Import-Modules in parallel when session profile loaded? HOT 1
- Issue with Get-WMIObject HOT 1
- Weird error running Invoke-Parallel
- Variable Creep HOT 3
- Adding item to external collection HOT 2
- Error A null key is not allowed in a hash literal HOT 1
- skips
- Invoke-Parallel skips processing some objects when throttle > 1 HOT 2
- Fast-Ping Sweep (recommendations or tricks) HOT 2
- $PWD inside the script block doesn't update after changing the current directory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from invoke-parallel.