Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Power Shell - Active Directory -  Pulling Domain group information

Posted on 2012-03-24
7
Medium Priority
?
967 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 27

Accepted Solution

by:
KenMcF earned 2000 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

A hard and fast method for reducing Active Directory Administrators members.
A bad practice commonly found during an account life cycle is to set its password to an initial, insecure password. The Password Reset Tool was developed to make the password reset process easier and more secure.
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 video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

688 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