$sqlQuery = get-content "D:\Scripts\sqlquery.txt";
$tnsalias = "tnsalias";
$username = "username";
$password = "password";
$sqlOutput = $sqlQuery | sqlplus -silent $username/$password@$tnsalias;
<?xml version="1.0" encoding="UTF-8"?>
<properties>
<entry key="thresholdEnabled">false</entry>
<entry key="executeFrom">0</entry>
<entry key="interval">5</entry>
<entry key="monitorName">Count</entry>
<entry key="commandLine">cmd /c powershell.exe -ExecutionPolicy RemoteSigned .\${FileName}.ps1 svchost.exe</entry>
<entry key="yaxisText">counts</entry>
<entry key="workingDir">${TempDir}</entry>
<entry key="version">2</entry>
<entry key="scriptBody">$sqlQuery = get-content "D:\Scripts\sqlquery.txt";
$tnsalias = "tnsalias";
$username = "username";
$password = "password";
$sqlOutput = $sqlQuery | sqlplus -silent $username/$password@$tnsalias;
Write-Host "Data:";
$sqlOutput;
exit 0;</entry>
<entry key="timeout">10</entry>
<entry key="monitorDescription">Powershell and SQLPlus script to get count</entry>
</properties>