0

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#
lab-r01#reload in 15
Reload scheduled in 15 minutes by admin on console
Reload reason: Reload Command
Proceed with reload? [confirm]
lab-r01#
*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.
lab-r01#

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

lab-r01#
lab-r01#reload cancel
lab-r01#

***
*** --- SHUTDOWN ABORTED ---
***

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

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

0

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

1

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
objLogFile.ClearEventLog()
Next