Solved

Power Shell - Active Directory -  Pulling Domain group information

Posted on 2012-03-24
7
963 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This article explains the steps required to use the default Photos screensaver to display branding/corporate images
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
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.

821 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