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

 

 

Facebooktwittergoogle_plusredditpinterestlinkedinmail

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:

http://social.technet.microsoft.com/Forums/windowsserver/en-US/fd7a2e66-6010-43f2-8ba5-655372270703/vhd-not-start-after-disk2vhd?forum=winserverhyperv

http://forum.sysinternals.com/vhd-not-start-after-disk2vhd_topic28951.html

this problem seems to be corrected on Windows 2012 R2:

http://bink.nu/what%E2%80%99s-new-for-hyper-v-in-windows-sever-2012-r2

the solution:

bootrec /fixmbr
bootrec /fixboot
bootrec /rebuildbcd
x:\sources\recovery\StartRep.exe
This worked for me.

 

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Read More ...