Tag Archives: Microsoft

Export Active Directory information

Many times we want to export information from Active Directory, to such an excel. To this end a very useful tool is the command CSVDE:

to see how it works it’s best to give some examples:

CSVDE -f usuarios.csv

Exports the object type ‘user’ and ‘computer’ Active Directory to a csv file

CSVDE -d “OU=Ejemplo,dc=es” r objectCategory=person -f usuarios.csv

Exports only objects ejemplo.es domain user type

CSVDE -f usuarios.csv -r “(&(objectClass=user)(sn=Pe*))”

Export users only objects where the name starts with “Pe” the “&” indicates a start logical “AND”

CSVDE -f usuarios.csv -r” (|(useraccountcontrol=20)(useraccountcontrol=30)(useraccountcontrol=333))”

Exports only objects where the userAccountControl field is equal to 20 or 30 or 333, the operator “|” indicates the logical initial “O”

CSVDE -f usuarios.csv  -l “DN, objectclass, objectcategory, givenName, sn”

Exports only the selected columns to see all selectable attributes of an object such person, a very useful page is:

Microsoft ldap person reference




Read More ...

Add GPT disk bootable to Hyper-v

Recently I use disk2vhd  from Microsoft to make an snapshoot and to virtualize one phisical IBM machine.

the problem was that the VHD  that have the boot partition C:  not boots on Hyper-V (Windows 2012 Standard edition)

this is becose the partition was in GPT mode not MBR and in Hyper-V there are some problems:



this problem seems to be corrected on Windows 2012 R2:


the solution:

bootrec /fixmbr
bootrec /fixboot
bootrec /rebuildbcd
This worked for me.



Read More ...