That command is supposed to run from a normal terminal window, not through putty. See
ldapsearch[
^] for full details.
Note: Saying,
"it doesn't work" does not give us any clue what your problem may be. In future please provide full details, including any relevant error messages/codes.