Solved

Power Shell - Active Directory -  Pulling Domain group information

Posted on 2012-03-24
7
950 Views
Last Modified: 2012-03-24
Hi all ..

Anyone know a way with PowerShell or Quest tools to pull this information from domain groups ?

Ideally would be to pull from multiple groups that I enter into a text file .

Managed by Tab
Description
Notes
0
Comment
Question by:MilesLogan
  • 3
  • 3
7 Comments
 
LVL 27

Accepted Solution

by:
KenMcF earned 500 total points
Comment Utility
With the Quest AD cmdelts you can do this and export it to csv file

$Group = get-content c:\temp\groups.txt
$Groups | Foreach {
get-qadgroup $_
} | Select Name, ManagedBy, Description, Notes | Export-csv c:\temp\groups.csv -no type
0
 
LVL 37

Expert Comment

by:Neil Russell
Comment Utility
Example scripts I wrote for a question in last few days....

http://www.experts-exchange.com/Programming/Languages/Scripting/Powershell/Q_27645732.html

Does what you want hopefully
0
 
LVL 2

Author Comment

by:MilesLogan
Comment Utility
hi KenMcF

I saved your code to a .PS1 file and received the error below .. any ideas ?


[PS] C:\powershell>./testG.ps1
Export-Csv : Parameter cannot be processed because the parameter name 'no' is ambiguous. Possible matches include: -NoC
lobber -NoTypeInformation.
At C:\powershell\testG.ps1:4 char:60
+ } | Select Name, ManagedBy, Description, Notes | Export-csv <<<<  c:\PowerShell\groups.csv -no type
    + CategoryInfo          : InvalidArgument: (:) [Export-Csv], ParameterBindingException
    + FullyQualifiedErrorId : AmbiguousParameter,Microsoft.PowerShell.Commands.ExportCsvCommand
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 27

Expert Comment

by:KenMcF
Comment Utility
change this on the end

-no type

it should not have a space

-notype
or
-notypeinformation
0
 
LVL 2

Author Comment

by:MilesLogan
Comment Utility
hi .. I tried both -notype and -notypeinformation and received this error .


[PS] C:\powershell>./testG.ps1
Get-QADGroup : Cannot validate argument on parameter 'Identity'. The argument is null or empty. Supply an argument that
 is not null or empty and then try the command again.
At C:\powershell\testG.ps1:3 char:13
+ get-qadgroup <<<<  $_
    + CategoryInfo          : InvalidData: (:) [Get-QADGroup], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Quest.ActiveRoles.ArsPowerShellSnapIn.Powershell.Cmdlet
   s.GetGroupCmdlet
0
 
LVL 27

Expert Comment

by:KenMcF
Comment Utility
Sorry, just noticed another typo i had

$Group = get-content c:\temp\groups.txt
$Groups | Foreach {


Should be

$Groups = get-content c:\temp\groups.txt
$Groups | Foreach {
0
 
LVL 2

Author Closing Comment

by:MilesLogan
Comment Utility
Thank you so much !
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

"Migrate" an SMTP relay receive connector to a new server using info from an old server.
Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

771 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

9 Experts available now in Live!

Get 1:1 Help Now