18 дек. 2014 г.

SOAP 1C, связь Oktell и Итилиум

Как из Октела закинуть информацию о телефонных звонках в Итилиум? Веб-запрос с GETами на php-скрипт, который дергает SOAP от 1С.
<pre>
<html>
<title>Itilium input call</title>
<?php
// http://localhost/itil/?Date=1&EventKind=2&ch1=3&ch2=4&cid1=5&cid2=6&id1=7&id2=8&descr=9
echo '<table>';
echo '<tr><td>Date</td><td>' . htmlspecialchars($_GET["Date"]) . '</td></tr>';
echo '<tr><td>EventKind</td><td>' . htmlspecialchars($_GET["EventKind"]) .'</td></tr>';
echo '<tr><td>cid1</td><td>' . htmlspecialchars($_GET["cid1"]) . '</td></tr>';
echo '<tr><td>cid2</td><td>' . htmlspecialchars($_GET["cid2"]) . '</td></tr>';
echo '<tr><td>descr</td><td>' . htmlspecialchars($_GET["descr"]) . '</td></tr>';
echo '</table>';

$client = new SoapClient("http://server/ITIL/ws/IT_AsteriskEvent/?wsdl",
array('login' => "user",'password'=> "12345",
                 'soap_version' => SOAP_1_1,'trace' => 1,
                 'exceptions' => false,'encoding'=>'utf-8'));
//print(var_dump($client->__getFunctions())."<br/>");
try
{
$client->Event(array('Date'=>htmlspecialchars($_GET["Date"]),
                     'EventKind'=>htmlspecialchars($_GET["EventKind"]),
                     'ch1'=>htmlspecialchars($_GET["cid1"]),
                     'ch2'=>htmlspecialchars($_GET["cid2"]),
                     'id1'=>htmlspecialchars($_GET["cid1"]),
                     'id2'=>htmlspecialchars($_GET["cid2"]),
                     'cid1'=>htmlspecialchars($_GET["cid1"]),
                     'cid2'=>htmlspecialchars($_GET["cid2"]),
             'descr'=>htmlspecialchars($_GET["descr"])
));
//echo "REQUEST:<br/>" . htmlentities(str_ireplace('><', ">\n<", $client->__getLastRequest())) . "<br/>";
//echo "RESPONSE:<br/>" . htmlentities(str_ireplace('><', ">\n<", $client->__getLastResponse())) . "<br/>";
}
catch (SoapFault $exception) 
{
    var_dump($exception->getMessage());

?>
</html>
</pre>

13 дек. 2014 г.

Kb3004394 - Windows 7 64bit, Server 2008

Remove it to get windows working.
.\psexec  \\PC  wusa /uninstall /kb:3004394 /quiet /norestart
Rest in peace.

4 дек. 2014 г.

Check number of active rdp users on any server from command line - powershell

Param(
[Parameter(Mandatory=$True,Position=1)]
[string]$computerName
)
net use \\$computerName\c$ /user:Domain\UserName Password| out-null
$Connections=qwinsta /server:$computerName|?{ $_ -match '^\srdp-tcp#' }|?{ $_ -match 'Активно|Active' }|wc -l
Write-host $Connections.trim()
net use \\$computerName\c$ /delete | out-null