Tips & Tricks : HP TouchSmart tm2t, Windows 8 and Switchable Graphics


Recently I came up with idea to upgrade operating system on my HP TouchSmart tm2t to Windows 8. In general there was no major issues except one. As this computer has two graphics adapters (Intel for low performance when operate on battery, AMD/ATI for better performance when operate on mains) there was small issue with configuring Switchable Graphics option.

After installation computer was operating only on low performance Intel card and thre was no possibility to switch to AMD/ATI. Here is what I’ve done ot make it work:



Tips & Tricks : Enabling Wireless Network in Windows Server 2012 Datacenter edition


If you want to use Windows Server 2012 Datacenter on workstation/laptop (sometimes it is handy to have mobile workstation with server operating system) you might experience issues with wireless networking. Even if driver for wireless network adapter is installed you might not be able to connect to any wi-fi network.

In order to use wireless in Windows Server 2012 Datacenter additional feature has to be installed: Wireless LAN Service. This can be installed from PowerShell prompt using add-windowsfeature wireless-networking command, as shown on screenshot below:

Once installed and server rebooted make sure that WLAN AutoConfig service is started, as shown on screenshot below:



Tips & Tricks : Burnflash on ShoreTel ShoreGear switches


Sometimes when ShoreTel ShoreGear switches connected to infrastructure might have old version of the firmware. In theory ShoreTel HQ Director should upgrade firmware on devices to bring it to current version across the infrastructure. However sometimes that fails and there is a need to enforce apropriate firmware on device.

In order to enforce firmware on ShoreTel switch best is to logon to ShoreTel HQ Director server and issue burnflash command as shown below:

C:\Program Files\Shoreline Communications\ShoreWare Server>burnflash -switch
Shoreline Communications BurnFlash Utility (Version 14.21.4905.0)
  Burning flash for switch "" (
  Current switch info:
      Internet Address:
      Ethernet Address: 00-10-49-00-00-00
Product Code: IPBX-SG4_T1
Firmware Version: 12.5.8107.0
           Patch Level: 0
       BootRom Version:
               Up Time: 0 days 00:28:21 (booted from Flash)
          POST Version: 3
TMS 5460: NccBurnFlash(...,0, Start
TMS 5460:                       : FileA Type=2,Unit=0,Language=
TMS 5460:                       : FileB Type=2,Unit=2,Language=en-US
TMS 5460: NccBurnFlashWorker2[]: WSASocket() --> 1616 (Error: 0)
   12.50 MBytes (100%) transferred to flash unit 0.
TMS 5460: NccBurnFlashWorker2[]: WSASocket() --> 1616 (Error: 0)
    1.13 MBytes (100%) transferred to flash unit 2.
  Rebooting switch.
TMS 5460: NccBurnFlash[]: End. hr = 0x0
  Waiting up to 180 seconds for switch to start.
  Waited 103.4 seconds ... connected.
  Current switch info:
      Internet Address:
      Ethernet Address: 00-10-49-00-00-00
          Product Code: IPBX-SG4_T1
      Firmware Version: 14.21.4905.0
           Patch Level: 0
       BootRom Version:
               Up Time: 0 days 00:00:00 (booted from Flash)
          POST Version: 3

IP address used in burnflash command is just an example and should be replaced with appropriate devide IP

Sometimes burnflash process has to be repeated twice to upgrade firmware correctly.
After burnflash power off device for 20 seconds and power back on.


Apps : Cisco7PCF for Android


Just released small app for Android platform. This app allows to decrypt type 7 password from Cisco devices as well as passwords from Cisco VPN profiles (PCF files).

Password which can be recovered using this app:

  • wireless keys fro Cisco access points,
  • RADIUS/TACACS shared secrets
  • NTP authentication keys
  • Enable passwords (NOT enable secrets, which are stored using MD5)
  • enc_GroupPwd – VPN group password from PCF file
  • enc_UserPassword – VPN user password from PCF file

You can find app in Google Play:



Config snippets : Cisco: Reload command might be handy


Few times in the past when I was doing some changes on Cisco devices remotely I was a victim of myself, when wrong order of commands just disconnected me from device without ability to connect back. After few experiences of this kind I discovered magic command “reload” which can help and save the day.

So, when doing changes which can impact remote terminal connection to device it’s a good idea to initiate reload before making changes. In case something goes wrong device will reboot itself and will come back with previous configuration.

lab-r01#reload in 15
Reload scheduled in 15 minutes by admin on console
Reload reason: Reload Command
Proceed with reload? [confirm]
*Mar  1 03:11:11.659: %SYS-5-SCHEDULED_RELOAD: Reload requested for 03:26:09 UTC Fri Mar 1 2002 at 03:11:09 UTC Fri Mar 1 2002 by admin on console. Reload Reason: Reload Command.

Once everything is configured and connectivity to device was not lost we can cancel reload process.

lab-r01#reload cancel


*Mar  1 03:11:19.415: %SYS-5-SCHEDULED_RELOAD_CANCELLED: Scheduled reload cancelled at 03:11:19 UTC Fri Mar 1 2002

It is very helpful and can save time and rescue from trouble.


Tips & Tricks : HP TouchSmart tm2 : Screen Rotation


When upgrading drivers on HP TouchSmart tm2 tablet important is to keep in mind that HP Quick Launch Buttons package might disable screen auto-rotation. In order to restore that functionality remove HP Quick Launch Buttons and install older version of that package from here. Full information about package is available on HP Quick Launch Buttons web page availabel here.

Another option might be registry settings adjustment. Parameters which control screen orientation and bahevior are located under:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Hewlett-Packard\HP Quick Launch Buttons\Schemes\Default\8526

There are two important parameters:
Notebook_Docked_DisplayOrientation = 0
Tablet_UnDocked_DisplayOrientation = 3

Available values for those parameters:
0 – primary landscape
1 – seconday portrait
2 – seconday landscape
3 – primary portrait


Code snippets : Windows : Clear Event Logs


From script repository I did use in the past, VBscript which allows to clear EvenLog on Windows machine. I did use that on computers with Windows XP and Windows Server 2003. however, this script will work also on Windows 7 and Windows server 2008.

By default script clears EventLog on computer where script is executed. To clear logs on remote machine just modify variable strComputer and replace dot with name of the target machine.

Script will read all EvenLog files from machine and will go through them removing all events.

And here is script itself :

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate, (Backup, Security)}!\\" _
& strComputer & "\root\cimv2")
Set colLogFiles = objWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile")
For each objLogfile in colLogFiles

Code snippets : SQL : Backup and FTP Database


When browsing repository of all scripts I did use in past, I found one which might be interesting. What this script does is:

  • Backups database to disk (name of database stored in @dbname, patch for backup stored in @archive_path, name of backup fine stored in @fname)
  • Compresses database backup using WinRAR (full command where to find WinRAR and how ot use it stored in @archive_cmd)
  • Generates set of commands for FTP client (series of xp_cmdshell commands redirecting output to F:\Backup\ftpcmds)
  • Uploads compressed backup to FTP server using command prompt FTP client command

I had that as small procedure executed automatically with SQL Server Agent. Script is for Microsoft SQL Server and I was running it on SQL Server 2000 and 2005. Here is code for that small procedure:


DECLARE @fname varchar(255)
DECLARE @fname_backup varchar(255)
DECLARE @fname_archive varchar(255)
DECLARE @archive_path varchar(255)
DECLARE @dbname varchar(255)
DECLARE @archive_cmd varchar(255)
DECLARE @put_cmd varchar(255)

SET @dbname = 'dbApplication'
SET @fname = @dbname + '_' + LTRIM(STR(DAY(GETDATE())))  + '.' + LTRIM(STR(MONTH(GETDATE()))) + '.' + LTRIM(STR(YEAR(GETDATE())))
SET @archive_path = 'F:\Backup\'
SET @fname_backup = @archive_path + @fname + '.BAK'
SET @fname_archive = @archive_path + @fname + '.RAR'
SET @archive_cmd = '"C:\Program Files\WinRAR\WinRAR.EXE" a ' + @fname_archive + ' ' + @fname_backup
SET @put_cmd = 'echo put ' + @fname_archive + '>> F:\Backup\ftpcmds'

PRINT @fname_backup
PRINT @fname_archive

BACKUP DATABASE @dbname TO DISK = @fname_backup WITH INIT

EXEC xp_cmdshell @archive_cmd
EXEC xp_cmdshell 'echo open> F:\Backup\ftpcmds'
EXEC xp_cmdshell 'echo user dbupload>> F:\Backup\ftpcmds'
EXEC xp_cmdshell 'echo password123>> F:\Backup\ftpcmds'
EXEC xp_cmdshell 'echo cd DB_Backup>> F:\Backup\ftpcmds'
EXEC xp_cmdshell 'echo bin>> F:\Backup\ftpcmds'
EXEC xp_cmdshell 'echo ha>> F:\Backup\ftpcmds'
EXEC xp_cmdshell @put_cmd
EXEC xp_cmdshell 'echo bye>> F:\Backup\ftpcmds'
EXEC xp_cmdshell 'ftp -d -i -n -s:F:\BACKUP\ftpcmds'

I hope that will be handy for someone to automate databsae backups and transfers.


Games : Screenshots : Skyrim – Visiting Sovngard




First look : System Center Virtual Machine Manager 2012 installation screenshots


Installation screenshots from System Center Virtual Machine manager 2012 installation. I did installation in my virtual LAB environment as part of excercise with System Center 2012.