1) You have to download emclikit.jar from Grid Control:
HTTP(S)://host:port/em/console/emcli/download
You put this file: $ORACLE_HOME/sysman/jlib
2) Set your JAVA_HOME and PATH environment variable.
>set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_13
>set PATH=%JAVA_HOME%\bin
And you can see it:
>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_13
>echo %PATH%
C:\Program Files\Java\jdk1.6.0_13\bin
3) Install emcli:
Go to the directory where you have installed emclikit.jar:
java -jar emclikit.jar client -install_dir=C:\Oracle_agent\10.2.0.5\agent10g\emcli_folder
4) Setup emcli:
emcli setup -url="http[s]://host:port/em/" -username="username" -password="password" -dir="C:\Oracle_agent\10.2.0.5\agent10g\emcli_folder" -trustall -novalidate
You can read more:
EM CLI