Installing EM13c Agents on Microsoft Windows Target Hosts

If your EM13c OMS installed on Unix-based OS, and want to deploy agents to Windows servers, you need to install Cygwin to target windows server to use regular deployment process. You can also use PsExec utility but in this case, you need a Microsoft Windows staging server. Installing Cygwin to enable SSH on Windows may sound like an unnecessarily complex solution at first, but Cygwin is easy to install and it comes with lots of useful utilities. So It’s worth installing. In this blog, I’ll show how to deploy EM agent on Microsoft Windows target. I’ll download and install Cygwin to the target server, enable SSH service and create user for SSH. After these steps, I’ll use Enterprise Manager Add Host page to deploy Enterprise Manager agent to the target Windows server like it’s just another Linux host.

First login to the target Windows server with administrator user and download Cygwin from Depending on your CPU architecture (is there any one still using 32bit?) you need to download setup-x86.exe or setup-x86_64.exe from the installation page. These are very small executables, and they will download the required packages from the internet.


When you run the setup-x86_64.exe, you see the welcome screen. You click NEXT to choose a download source. If your target server has no internet access, you can install packages from a local directory. That means, you can use the packages downloaded by another Cygwin installation on another server. All you need is to use a shared location or copy files from other server which is already Cygwin installed. Click NEXT to continue.


In this screen you set the installation path. Be careful that, Cygwin 64bit’s default installation path is “C:\Cygwin64”, but in “” file of Oracle Enterprise Manager, Cygwin path is defined as “C:\Cygwin” so So if you use a different path than “C:\Cygwin”, you need to modify all path variables in the file ($OMS_HOME\oui\prov\resources\ At first, I left it as it is, then I had to modify the “” file:

After setting the correct path, click NEXT button. It will ask you where it should download the packages, how your server connects to internet, which download site should be used. Usually it’s okay to accept the defaults until you see “select packages” screen.


All you need is to select “openssh and openssl” packages. So type “opens” into the search box, expand the “Net” category, and select the openssh and openssl packages. Cygwin installer will detect the additional required packages, just accept them and click NEXT until installation start, then wait for downloads and installations of packages are done.

After the installation is done, right-click on Cygwin64 Terminal icon on the desktop and choose “run as administrator”. So the terminal will start with admin rights.

Run ssh-host-config and give the following answers to the questions:

Query: Should StrictModes be used? (yes/no) yes
Query: Should privilege separation be used? (yes/no) yes
Query: new local account ‘sshd’? (yes/no) yes
Query: Do you want to install sshd as a service? yes
Query: Enter the value of CYGWIN for the daemon: []
Query: Do you want to use a different name? (yes/no) no
Query: Create new privileged user account ‘SQL01\cyg_server’ (Cygwin name: ‘cyg_server’)? (yes/no) yes
Query: Please enter the password: password
Query: Reenter: password

It should say “Host configuration finished” at the end. In my installation, it couldn’t find “cyg_server” for SSHD although it created, so it used “SYSTEM” user. That’s fine. Now open “C:\cygwin\etc\sshd_config” file (you can use vi or any other editor). Add the following line at the end of the time:

Then start SSH service:

For now, you do not have any users in Cygwin environment. I’ll add my current (local) user to the Cygwin environment so we’ll be able to use it when deploying agent.

As you can see I checked if there’s any line added to /etc/passwd. If you see your username there, you should be able to connect the target Windows server using SSH.


Now we need to login to EM13c console, go to “Add Targets Manually” page, click “Install Agent on Host”.


Enter host name and select the platform, click NEXT to go to “installation details” screen. Of course, you should have already installed the agent for Windows platform to be able to choose it on “the platform select box”.


Enter the path in Windows format, for example: “C:\oracle\emagent”. Enter the username you added to “/etc/passwd” on the target Windows server. Click “NEXT” and deploy the agent. That’s all. Now we can deploy Microsoft SQL Server plugin to this agent and monitor our Microsoft SQL Servers, but I’ll tell it on another blog post 🙂

Please share

AWS Big Data Specialist. Oracle Certified Professional (OCP) for EBS R12, Oracle 10g and 11g. Co-author of "Expert Oracle Enterprise Manager 12c" book published by Apress. Awarded as Oracle ACE (in 2011) and Oracle ACE Director (in 2016) for the continuous contributions to the Oracle users community. Founding member, and vice president of Turkish Oracle User Group (TROUG). Presented at various international conferences including Oracle Open World.


  1. Kees Schouten

    We did not want to install Cygwin and PsExec dit not work. Now we use the following solution:

    We copy the folder containing setup_agent_win64.exe and AgentDeploy.bat to d:\install\agent13c on the databasesserver
    We edit agent.rsp
    cd /d d:\install\agent13c
    agentdeploy.bat AGENT_BASE_DIR=D:\oracle\product\13.1.0\agent13c RESPONSE_FILE=d:\install\agent13c\agent.rsp

    Important: you have to use capitals, it will not work if you use agent_base_dir or response_file.

    • Ruslan

      Hi Kees,

      Before 13c I’ve had no problem with installing EM agent on Windows hosts. But now I’m getting error:

      Microsoft Windows [Version 6.3.9600]
      (c) 2013 Microsoft Corporation. All rights reserved.
      C:\Windows\system32>C:\INSTALL\\agentDeploy.bat AGENT_BASE_DIR=C:\oracle\agent RESPONSE_FILE=C:\
      Present working directory:C:\INSTALL\
      Archive location:C:\INSTALL\ directory
      Agent base directory:C:\oracle\agent
      Agent base directory:C:\oracle\agent
      OMS Host:
      Agent image loc : “C:\INSTALL\”
      “Space available in AgentBaseDirectory is 82949 MB”
      Reading the properties file: “C:\INSTALL\″\
      1 file(s) copied.
      This is the version
      This is the type agent
      This is the aru id 233
      “Validating the OMS_HOST & EM_UPLOAD_PORT”
      value of agenthome is “C:\oracle\agent\agent_13.”
      Archive: C:/INSTALL/
      inflating: C:/oracle/agent/Disk1/stage/Components/oracle.jre/
      “Validating the OMS_HOST & EM_UPLOAD_PORT”
      AGENT_ins home is:AGENT_BASE_DIR=C:\oracle\agentoraclehome is:C:\oracle\agent\agent_13.
      The oraclehome C:\oracle\agent\agent_13.
      Agent deployment log location: C:\oracle\agent\agent_13.\cfgtoollogs\agentDeploy\agentDeploy_2016-11-17_17-05-06-
      Agent deployment completed successfully.
      “Validating OMS_HOST & EM_UPLOAD_PORT sucessfully.”
      1 file(s) copied.
      “The oracle home value should be set to C:\oracle\agent\agent_13.”
      “C:\INSTALL\\setup_agent_win64.exe -prereqChecker -entryPoint “”
      -silent -nowait -noconsole -ignoreSysPrereqs -detailedExitCodes -responseFile C:\oracle\agent\agentInstall.rsp -J-DORAC\oracle\agent\agent_13.\cfgtoollogs\prerelogs”
      “C:\INSTALL\ -silent -nowait -noconsole -responseFile C:\oracle\agent\agen
      “ERROR: Agent installation failed.”

      Here is agent.rsp:


  2. Gbenga A

    This is great write up Gokhan. At the moment, I don’t have a need to deploy 13c agent on a window server, but I’ll definitely check back to this blog if and when the time comes.

  3. Jayakishore

    Hi Sir,

    Where we need to run this command “/bin/mkpasswd -l -u dbadmin >> /etc/passwd”
    on OMS server or target host

Leave Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.