Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Power Shell - Active Directory -  Pulling Domain group information

Posted on 2012-03-24
7
Medium Priority
?
972 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 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
WatchGuard Case Study: Museum of Flight

“With limited money and limited staffing, we didn’t have a lot of choices in terms of what we could do to bring efficiency. WatchGuard played a central part in changing that.” To provide strong, secure Wi-Fi access within the museum, Hunter chose to deploy WatchGuard’s AP120 APs.

 
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

Industry Leaders: 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!

Question has a verified solution.

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

Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

963 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