Sunday, September 28, 2014

In the swirl

Thursday, September 25, 2014

Deploy Sametime Broadcast tools and Advanced server settings

Broadcast tools Server settings:

Sameteime Advanced Server settings:

This setting can be deploy by overwriting only one file com.ibm.collaboration.realtime.bcs.prefs.
This file is located under every users profile in
%appdata%\IBM\Sametime\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.ibm.collaboration.realtime.bcs.prefs
To deploy meeting room servers
copy file
%appdata%\IBM\Sametime\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.ibm.rtc.meetings.shelf.prefs
This is how i push this setting via user logon script:
xcopy "userprofile\AppData\Roaming" "%appdata%" /Y /S
The backup of IBM folder with multiple directories and only one file is placed just in source destination
userprofile\AppData\Roaming
I create this source sub-directories just to better remember where actual the file is located.

Sunday, September 21, 2014

Ball of yarn

Thursday, September 18, 2014

Launch IBM Sametime 9 at startup

@echo off
set sw=HKEY_LOCAL_MACHINE\SOFTWARE
set r=Microsoft\Windows\CurrentVersion\Run
set e=IBM\Sametime Connect\rcp\rcplauncher.exe

if exist "C:\Program Files (x86)\%e%" ^
reg add "%sw%\Wow6432Node\%r%" ^
/v "Sametime" /t REG_SZ /d "\"C:\Program Files (x86)\%e%\" -nosplash" /f

if exist "C:\Program Files\%e%" ^
reg add "%sw%\%r%" ^
/v "Sametime" /t REG_SZ /d "\"C:\Program Files\%e%\" -nosplash" /f

setlocal EnableDelayedExpansion
if not "%ProgramFiles(x86)%"=="" (
:64bit
reg query "%sw%\Wow6432Node\%r%" /v "Sametime" > nul 2>&1
if !errorlevel!==0 (
if not exist "C:\Program Files (x86)\%e%" reg delete "%sw%\Wow6432Node\%r%" /v "Sametime" /f
)
)

if "%ProgramFiles(x86)%"=="" (
:32bit
reg query "%sw%\%r%" /v "Sametime" > nul 2>&1
if !errorlevel!==0 (
if not exist "C:\Program Files\%e%" reg delete "%sw%\%r%" /v "Sametime" /f
)
)
endlocal

Wednesday, September 17, 2014

https://googledrive.com/host/.. direct link no longer work

All link starting with https://googledrive.com/host/ in no longer able to retrieve the actual file :(
403. That’s an error.

We're sorry, but you do not have access to this page.
That’s all we know.
This is bad and wrong. What we gone do now?

Another way to create direct link is paste the id at the end:
https://drive.google.com/uc?export=download&id=
for example
https://drive.google.com/uc?export=download&id=0B_esWdErYKaLUjBPb0RrYzJXLTA

Tuesday, September 16, 2014

Set up zabbix agent on centOS

If already existing zabbix-agent then remove it with
yum remove zabbix-agent
yum remove zabbix
download zabbix binaries
wget http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-2.2.6-1.el6.x86_64.rpm
wget http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-agent-2.2.6-1.el6.x86_64.rpm
or browse for latest:
http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/

By default centOS do not include wget. So you can also copy the binaries with WinSCP

Install zabbix agent
rpm -ivh zabbix-2.2.6-1.el6.x86_64.rpm
rpm -ivh zabbix-agent-2.2.6-1.el6.x86_64.rpm
Empty existing configuration
cd /etc/zabbix
truncate --size 0 zabbix_agentd.conf
There are two files in directory zabbix_agent.conf and zabbix_agentd.conf.
The right one is zabbix_agentd.conf with d at the end!

copy your configuration content to clipboard
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
DebugLevel=3 
EnableRemoteCommands=1 
Server=zabbix.domain.com
Hostname=newhost.domain.com
open zabbix configuration
cd /etc/zabbix
vi zabbix_agentd.conf
press i to insert some stuff
if use putty the press right mouse click to paste content from clipboard.
press esc and write :wq to save the file

Set zabbix to start after computer reboot
chkconfig zabbix-agent on
check iptebles if this client has exception for zabbix server
service iptables status
insert exception
iptables -I INPUT 7 -s zabbix.domain.com -m state --state NEW -m tcp -p tcp --dport 10050 -j ACCEPT
replace 7 line number with line number where EJECT rule is having a good time
replace zabbix.domain.com with zabbix server ip adress

Save new configuration to load after reboot
iptables-save > /etc/sysconfig/iptables
Re-start zabbix agent
service zabbix-agent restart
or
service zabbix-agentd restart

Sunday, September 14, 2014

Monday, September 8, 2014

Remote restart printer spooler

Save this file as %systemroot%\System32\remote.restart.spooler.cmd
psexec /accepteula \\%1 net stop spooler
rm \\%1\c$\WINDOWS\system32\spool\PRINTERS\*.*
psexec \\%1 net start spooler
Copy psexec to %systemroot%\System32\

Everytime you need to restart printer spooler on remote machine open command prompt in "Run as administrator" mode
and type
remote.restart.spooler.cmd computername

Silverlight silent install, detection method

@echo off
set sw=HKLM\SOFTWARE
set u=Microsoft\Windows\CurrentVersion\Uninstall
set k={89F4137D-6C26-4A84-BDB8-2E5A4BB71E00}
setlocal EnableDelayedExpansion
reg query "%sw%\%u%\%k%" > nul 2>&1
if not !errorlevel!==0 goto install
reg query "%sw%\%u%\%k%" /v Version | find "5017732"
if !errorlevel!==0 goto already
:install
if not "%ProgramFiles(x86)%"=="" (
start /wait "" "%~dp0Silverlight_x64.exe" /q /doNotRequireDRMPrompt /ignorewarnings
)
if "%ProgramFiles(x86)%"=="" (
start /wait "" "%~dp0Silverlight.exe" /q /doNotRequireDRMPrompt /ignorewarnings
)
echo.
:already
endlocal
RunOnce method also is welcomed if not maintenance the script frequently.
The script will be executed only if not find log file.
If the new version if Silverlight came out you have to delete all log files
@echo off
set l=%~dp0
set sw=HKLM\SOFTWARE
set u=Microsoft\Windows\CurrentVersion\Uninstall
set k={89F4137D-6C26-4A84-BDB8-2E5A4BB71E00}
setlocal EnableDelayedExpansion
if not exist "%l%\%computername%.log" (
reg query "%sw%\%u%\%k%" > nul 2>&1
if not !errorlevel!==0 goto install
reg query "%sw%\%u%\%k%" /v Version | find "5017732"
if !errorlevel!==0 goto already
:install
if not "%ProgramFiles(x86)%"=="" (
start /wait "" "%~dp0Silverlight_x64.exe" /q /doNotRequireDRMPrompt /ignorewarnings
)
if "%ProgramFiles(x86)%"=="" (
start /wait "" "%~dp0Silverlight.exe" /q /doNotRequireDRMPrompt /ignorewarnings
)
:already
reg query "%sw%\%u%\%k%" /v Version | find "Version" > "%l%\%computername%.log"
)
endlocal

Sunday, September 7, 2014