Solved

Power Shell - Active Directory -  Pulling Domain group information

Posted on 2012-03-24
7
957 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
ID: 37761469
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
ID: 37761476
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
ID: 37761609
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
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.

 
LVL 27

Expert Comment

by:KenMcF
ID: 37761632
change this on the end

-no type

it should not have a space

-notype
or
-notypeinformation
0
 
LVL 2

Author Comment

by:MilesLogan
ID: 37761645
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
ID: 37761653
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
ID: 37761679
Thank you so much !
0

Featured Post

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.

Question has a verified solution.

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

In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
Synchronize a new Active Directory domain with an existing Office 365 tenant
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 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…

930 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

14 Experts available now in Live!

Get 1:1 Help Now