Wednesday, August 24, 2011

MS Outlook autocomplete cache file

MS Outlook autocomplete cache file 
path for file:
Windows XP
C:\Documents and Settings\username\Application Data\Microsoft\Outlook\outlook.NK2
Windows 7
C:\Users\username\AppData\Roaming\Microsoft\Outlook\outlook.NK2
Maximim emails key
H_KEY_CURRENT_USER\Software\microsoft\Office\10.0\outlook\
DWORD MaxNicknames default it is 1000

Wednesday, August 17, 2011

Cisco switch port security

 Example:
int Fa0/1 
switchport mode access
!- maximum MAC address on port
 switchport port-security maximum 2
 switchport port-security
!- restrict MAC, logging  but don't shutdown port
 switchport port-security violation restrict
 switchport port-security mac-address sticky
 !- allowed MAC addresses
 switchport port-security mac-address sticky 702a.0371.96a6
 switchport port-security mac-address sticky 78d6.f355.eb4d
Show port security settings:
show port-security int Fa 0/1

Thursday, August 11, 2011

Cisco DHCP Snooping

just config, it's pretty easy
!enable DHCP snooping for vlan 1
ip dhcp snooping
ip dhcp snooping vlan 1
!enable DHCP option 82
ip dhcp snooping information option
!set trust port for DHCP server
int Gi0/2
ip dhcp snooping trust
!set limit per second
int range Fa0/1 - 24
ip dhcp snooping limit rate 20
!set trust trunk port:
ip dhcp snooping trust

show settings:
show ip dhcp snooping
show ip dhcp snooping binding


Friday, August 5, 2011

Remote change power settings

you can use it if need change power settings for remote computer

get info about remote power pc settings:

PsExec.exe \\rcomputer  powercfg -query

 

disable sleep timeout:

PsExec.exe \\rcomputer  powercfg -change -standby-timeout-ac 0

 

other interesting options:

 

powercfg -change -monitor-timeout-ac 0

powercfg -change -monitor-timeout-dc 0

powercfg -change -disk-timeout-ac 0

powercfg -change -disk-timeout-dc 0

powercfg -change -standby-timeout-ac 0

powercfg -change -standby-timeout-dc 0

powercfg -change -hibernate-timeout-ac 0

powercfg -change -hibernate-timeout-dc 0

 

Remote enable Remote Desktop

This example show how you can use PsExec for enable Remote Desktop remotely

Enable RDP:

PsExec.exe \\remotepc  reg add "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0

 

Enable RDP through firewall:

PsExec.exe \\remotepc netsh firewall set service remoteadmin enable

PsExec.exe \\remotepc netsh firewall set service remotedesktop enable