Powershell create directory structure for KEO4

Java KEO4 uses thin client on Windows terminal server. I got a task to create this java client for several new users and copy this client per user to folder. To acomplish this, I’ll fetch the txt content into the array, than I will walk through the array with foreach statement.

The source folder is in c:\Alis\keo4_kl
The users.txt looks like:
Within each folder, I’ll put client into keo4_klient subfolder.


$Source = ‘C:\Alis\keo4_kl’
$users = Get-Content ‘users.txt’

foreach ($i in $users)
{mkdir c:\Alis\$i}

Start-Sleep -s 10

foreach ($i in $users)
{Copy-Item $Source -Destination c:\Alis\$i\$client -recurse}

The usefull command before and after is to check the HDD size:
gwmi win32_logicaldisk | Format-Table DeviceId, MediaType,Size, {$_.FreeSpace

PS C:\Alis> gwmi win32_logicaldisk | Format-Table DeviceId, MediaType, Size, {$_.FreeSpace /1GB}

DeviceId MediaType Size $_.FreeSpace /1GB
——– ——— —- —————–
A: 5 0
C: 12 429126578176 5,02063369750977

As we can see there is only 5 GB left. It’s a right time to speak to vmware admin to get more space assigned.

Posted in News | Comments Off on Powershell create directory structure for KEO4

Why I do not study for CCNP R&S.

So a year passed since my CCNA R&S. After 2 years almost day-to-day study, 1 hour in the Morning. Building the mind maps for the exam. It was rewarding to me and I enjoyed it. However today I work at Cisco as the security engineer and gained a lot of experiences on the way here.

Please note, get to certification makes you learn everything, but you cannot be expert in everything.

Curious? Yes, do not overwhelme yourself.

Certification exam is designed to break you, to fail. It does not test your real knowledge. It´s a business and you need re-certification each 3 years.

CCNA is complex and gives you most of the professional orientation. Continuing to CCIE would make you antisocial “buddy”, while spending 3000 hours for THE exam without going out, working on the garden or doing pub socializing.

At our team the skills needed to become a good team mate, are:

  • Logic – just basic mathematical principles
  • Communication skills – be able to summarize customer problem, explain to the team and outline action plan.
  • Support engineer works with flustrated customer. That´s why they escalated the ticket to you, weren ´t they?
  • Criticism – not all problems are intended to solve. Let the front end engineers to do their job. Othewise they’ll lean on you more and more.
  • Do not reinvent the bicycle – trace down who had this problem before.
  • Relax – even when the people push to you, do not start 3rd world war.

Now some practical interlude for money&time management.

  1. Do not pay for study materials out of your pocket. A company should supply you with year subscription in safaribooks, lynda.com or cbtnuggest.com
  2. Ballance the time at work with study. Do not accept process, when you finish your work and you get immediatelly twice as much. Managers often call it as work ballance for the team.
  3. Regardless of the technical support position you’ve been hired for, the company is well aware of “longer you stay with us, better”. Every team is frightened of people coming in and leaving out. One year is the time they invest in you, Second year the effort pays them back.
  4. Managers have access to the team budget. That means you are eligible to get training per your interest. Do not accept, that study for CCNA is not related to your job, because company does not work with Cisco products.
  5. Finally for a long term and healthy life, stop working once you leave the office.

This way you should be always ready to say yes for better offer. Be sharp with your attitude and be professional. Loyalty is nice thing, but companies think this way: “We let you to gain experiences somewhere else, and than we try to hook you up”.

Working in an International company makes you delivere a professional support and get grown for your personal development. There is nothing between.

Posted in News | Comments Off on Why I do not study for CCNP R&S.

Backup files to FTP server Lenovo EMC from CentOS 6.7 application server

This project perfectly fits to have valid backup, after ransomware attack. Wannacry was able to encrypt all mapped drives in Windows including local disk in seconds.


    CentOS 6.7 – application server, tomcat, Postgres, Java application
    NAS LENOVO EMC – in the same LAN, allows only FTP not SSH by factory defaults
  • yum install curlftpfs
  • CurlFtpFS is a filesystem for accessing FTP hosts. more info More info about curlftpfs

  • Your source directory is /home/djanulik/Documents/zalohy/keo4/
  • curlftpfs /mnt/w -o user=username:password
  • This mounts the FTP into local file system under /mnt/w

  • Please note, if you run directly the rsync to dest directory, you will receiver error 95.
    1. Operation not supported (95)

    The FTP does not allow to create temp files. Instead you should create those temp files locally. This is done directly with rsync using –temp-dir=/home/djanulik/Documents/temp/rsync

  • mkdir -p /home/djanulik/Documents/temp/rsync
  • rsync -rav –temp-dir=/home/djanulik/Documents/temp/rsync /home/djanulik/Documents/zalohy/keo4/a0-keo4-cosArch-vac_auto_2016-07-13.csv /mnt/w
    1. More info about RsyncRsync is a fast and extraordinarily file copying tool
  • Finally you can schedule the regular job with cron
  • Posted in News | Comments Off on Backup files to FTP server Lenovo EMC from CentOS 6.7 application server

    Backup project

    The task was about choosing and configuring appropriate backup techlology for SBS 2011 server.
    1. Synology NAS DS411 Slim.
    2. Switch Cisco with 2GB ports other ports Fastehternet.
    To the first GB port, the server is connected.
    Second GB port is for NAS server synology.

    NAS Synology
    – it provides iSCSI service an alternative to SAN.
    – this solution was chosen ration price/service
    – iSCSI provides SCSI across the LAN and TCP/IP encapsulates SCSI packets.
    – The connected disk is accessible as a local disk in Windows server, without needing to install any drivers.

    The NAS synology consist from 2 hard disks with 450 GB capacity per each.
    This is failover solution if one of the disks is broken.
    First I created a volume. RAID collects several hard disks into one functional topology. This collection of disks is called RAID.
    We use RAID 1, which provides mirroring of data stored on each disk.
    The content is recorded on both disks by RAID 1. If one disk fails, the copy is immediately ready to use.

    Second I had to set up iSCSI LUN. The storage capacity is assigned, if data was physically created.
    This process is controlled by iSCSI LUN at the NAS Synology.

    Finally I configured DiskStation as the iSCSI target and connect it to the Windows server.
    I connect iSCSI target to the LUN unit. Windows server provides easy iSCSI initiator.
    I looked up iSCSI portal using IP address of Synology and default port 3260.
    This iSCSI target is listed in Disk Management. Initialization is a must before the first use.
    At the end I assigned label F: for this volume and after formating the disk appeared in Windows.

    iSCSI LUN assignes dynamically space for stored data. This process is provided by virtualization techlogy.
    Although we use iSCSI for backup, the disk is visible in Windows server as a local disk.
    It can provide more disk capacity for existing server. e.g. storing logs. Windows SBS 2011 server provides built-in backup technology. Each night server performs backup schedule and stores data in NAS.

    Posted in News | Comments Off on Backup project

    KEOX uninstall via Windows Command line

    We’ve decided to move our Information system to the new server using windows command line
    1. We need to determine if the services are running. The first service is service used by IS KEOX and the second is MySQL server.

    • C:\>sc query type=service state=running | sc qc keox-nt
    • C:\>sc query type=service state=running | sc qc MySQL
      If you do not know the exact name of a service use this:

    • sc query type= service | find /v “x0” | find /i “MySQL*”
      Well now we’re going to backup database keox into sql file.

    • cd %programfiles%
    • cd MySQL\MySQL Server 5.0\bin\
    • mysqldump –lock-tables –compatible=no_table_options,no_field_options –user=”root” –password=”” -B keox > “C:\keox\backup\keox.sql”
    • Stop service MYSQL
    • sc stop MYSQL
    • Delete the service MYSQL
    • sc delete MYSQL
    • sc stop keox-nt
    • Delete the service keox-nt
    • sc delete keox-nt

    2. To be on a safe side, backup an existing directory contains MySQL.

    • C:\Program Files\7-Zip>7z a -tzip “C:\zalohy\MySQL290911.zip” “c:\Program Files\
      MySQL\*” -r

    2a. And so do for directory keox.

    • C:\Program Files\7-Zip>7z a -tzip “c:\zalohy\keox290911.zip” “c:\keox\*” –r
    • a make an archive
    • -r pack recursively

    3.Delete directory we do not need any more.

    • cd %programfiles%
      If you are not sure whether the directory MySQL is located

    • dir *MySQL*.* /s/a:d
    • /s/a:d searching for directories only
    • del MySQL /S /Q
    • del c:\keox /S /Q
    • /S include subdirectories
    • /Q delete without asking
    Posted in News | 2 Comments

    Installation of the MySQL 5.1 Win7

    You can download the last MySQL server zip file directly from the web page. There are several steps such as1:

    • You should extract the file into the folder e.g. D:\MySQL\server
    • Run Command line and type net user Administrator /Active :yes
    • This enables in-built Account Administrator
    • Next step is to run command line with administrator privilegies
    • runas /noprofile /user:David-PC\Administrator cmd
      Write password for David-PC\Administrator:
    • type cd %programfiles%
    • We need to look for MySQL directory if it is already located in %programfiles%
    • dir “*MySQL*” /s/a:d
    • The last step is to copy MySQL server in the %programfiles% directory
    • xcopy D:\MySQL\server\mysql_server_5.1.50_win32 “Pro
      gram files\MySQL\” /s /e
    • The last step is to edit my.ini with the pspad and set the format as ANSI
    • Finally install the service
    • install the MySQL service “C:\Program Files\MySQL51\server\bin\mysqld” –install MySQL51 –defaults-file=”C:\Program Files\MySQL51 \server\my.ini”
    • Start the service
    • sc start MYSQL51
    • Check if the service is running
    • sc qc MySQL51
    • sc query type=service state=running | sc qc MySQL51
    • sc query type= service | find /v “x0” | find /i “MySQL”
    • Disable Super Administrator account
    • net user Administrator /Active :no
    • log in to MySQL server
    • cd “c:\Program Files\mysql\MySQL Server 5.0\bin”
    • mysql -u root -p
    Posted in News | Comments Off on Installation of the MySQL 5.1 Win7