Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1513
  • Last Modified:

Exporting security groups with user information, csvde - csv dump

Hi,

How's it going? I'm wondering if anyone can help me with a shell command that will export all security groups from a specific OU with the names\accounts of each member of the groups in a format that's  importable to a new AD domain.  

I've tried going to a few sites and using various commands but I'm running into issues as I'm a complete noob, this one doesn't work at all and I'm in a rush due to a project.
"csvde -d "ou=West,dc=MyDomain,dc=com" -f group.csv -l objectClass,cn,member,distinguishedName,sAMAccountName,groupType,objectCategory"

Any help would be most appreciated.

Cheers
0
RWA203
Asked:
RWA203
  • 3
1 Solution
 
Gareth GudgerCommented:
Try looking at the Import/Export options of LDIFDE.
http://support.microsoft.com/kb/237677
0
 
SubsunCommented:
You can use the following script if you have MS AD PowerShell enabled..
Get-ADGroup -Filter {GroupCategory -eq "Security"} -ResultSetSize Unlimited | % {
$Group = $_
Get-ADGroupMember $Group.Name | Select @{L='GroupName';e={$Group.Name}},Name,ObjectClass
} | Export-Csv C:\Result.csv -NoTypeInformation

Open in new window

If not you may install Quest AD PS in any member computer in you domain and use the following script..
ActiveRoles Management Shell for Active Directory
Get-QADGroup -SizeLimit 0 | ?{$_.GroupType -eq "Security"} | % {
$Group = $_
Get-QADGroupMember $Group.Name | Select @{L='GroupName';e={$Group.Name}},Name,Type
} | Export-Csv C:\Result.csv -NoTypeInformation

Open in new window

0
 
RWA203Author Commented:
Cheers, I have powershell. I'll give it a try.
0
 
RWA203Author Commented:
I ended up using Manage engines ADManager Plus, which is what I would recommend to anyone doing a migration. The 30 day trial gives you full reports functionality for just about anything you can think of as well as bulk import export stuff. Really useful.
0
 
RWA203Author Commented:
This is far easier and has all reports built into a gui, rather then trying to learn the powershell commands or learning to script .Great for non scripty people who need to get things done quickly.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now