Sunday, August 10, 2014

Tips Every Admin Should Know

Active Directory

1. To quickly list all the groups in your domain, with members, run this command:
dsquery group -limit 0 | dsget group -members –expand

2. To find all users whose accounts are set to have a non-expiring password, run this command:
dsquery * domainroot -filter “(&(objectcategory=person)(objectclass=user)(lockoutTime=*))” -limit 0

3. To list all the FSMO role holders in your forest, run this command:
netdom query fsmo

4. To refresh group policy settings, run this command:
gpupdate

5. To check Active Directory replication on a domain controller, run this command:
repadmin /replsummary

6. To force replication from a domain controller without having to go through to Active
Directory Sites and Services, run this command:
repadmin /syncall

7. To see what server authenticated you (or if you logged on with cached credentials) you can run either of these commands:
set l
echo %logonserver%

8. To see what account you are logged on as, run this command:
whoami

9. To see what security groups you belong to, run this command:
whoami /groups

10. To see the domain account policy (password requirements, lockout thresholds, etc) run this command:
net accounts


Windows Networking

11. To quickly reset your NIC back to DHCP with no manual settings, run this command:
netsh int ip reset all

12. To quickly generate a text summary of your system, run this command:
systeminfo | more

13. To see all network connections your client has open, run this command:
net use

14. To see your routing table, run either of these commands:
route print
netstat -r

15. Need to run a trace, but don’t have Netmon or Wireshark, and aren’t allowed to install either one? Run this command:
netsh trace start capture=yes tracefile=c:\capture.etl
netsh trace stop

16. To quickly open a port on the firewall, run this command, changing the name, protocol, and port to suit. This example opens syslog:
netsh firewall set portopening udp 161 syslog enable all

17. To add an entry to your routing table that will be permanent, run the route add command with the –p option. Omitting that, the entry will be lost at next reboot:
route add 0.0.0.0 mask 0.0.0.0 172.16.250.5 –p

18. Here’s a simple way to see all open network connections, refreshing every second:
netstat –ano 1

19. You can add a | findstr value to watch for only a specific connection, like a client ip.addr or port:
netstat –ano | findstr 216.134.217.20

20. You can use the shutdown to shutdown or reboot a machine, including your own, in a simple scheduled task like this:
shutdown –r –t 0 –m \\localhost

21. To make planned DNS changes go faster, reduce the TTL on the DNS records you plan on changing to 30 seconds the day before changes are to be made. You can set the TTL back to normal after you confirm the changes have been successful.

22. Set a short lease on DHCP scopes that service laptops, and set Microsoft Option 002 to release a DHCP leas on shutdown. This helps to ensure your scope is not exhausted and that machines can easily get on another network when the move to a new site.


Windows 7

23. Want to enable the local administrator account on Windows 7? Run this command from an administrative command prompt. It will prompt you to set a password:
net user administrator * /active:yes

24. You can do the same thing during install by pressing SHIFT-F10 at the screen where you set your initial user password.
Windows 7 supports several useful new keyboard shortcuts:

25. Windows Key+G
Display gadgets in front of other windows.

26. Windows Key++ (plus key)
Zoom in, where appropriate.

27. Windows Key+- (minus key)
Zoom out, where appropriate.

28. Windows Key+Up Arrow
Maximize the current window.

29. Windows Key+Down Arrow
Minimize the current window.

30. Windows Key+Left Arrow
Snap to the left hand side of the screen

31. Windows Key+Right Arrow
Snap to the right hand side of the screen.

32. To quickly launch an application as an administrator (without the right-click, run as administrator), type the name in the Search programs and files field, and then press Ctrl-Shift-Enter.
Here are some tips that can save you from buying commercial software:

33. Need to make a quick screencast to show someone how to do something? The Problem Steps Recorder can create an MHTML file that shows what you have done by creating a screen capture each time you take an action. Click the Start button and type ‘psr’ to open the Problem Steps Recorder.

34. Need to burn a disc? The isoburn.exe can burn ISO and IMG files. You can right click a file and select burn, or launch it from the command line.

35. Windows 7 includes a screen scraping tool called the Snipping Tool. I have tons of users request a license for SnagIt, only to find this free tool (it’s under Accessories) does what they need.

36. You can download this bootable security scanner from Microsoft that will run off a USB key, which is very useful if you suspect a machine has a virus.

37. A great way to save all your command line tools and make them available across all your computers is to install Dropbox, create a folder to save all your scripts and tools, and add that folder to your path. That way, they can be called from the command line or any other scripts, and if you update a script, it will carry across to any other machine you have.


Windows 2008

38. You can free up disk space on your servers by disabling hibernate. Windows 2008 will create a hiberfil.sys equal to the amount of RAM. This is very useful with VMs that have lots of RAM but smaller C: drives. To disable hibernation, and reclaim that space, run this command:
powercfg -h off

39. You can get to the complete collection of Sysinternals tools online. You can even invoke them from the run command. Use the url: http://live.sysinternals.com or the UNC path: \\live.sysinternals.com\tools.

40. Speaking of the Sysinternals tools, almost any command line in this article can be run remotely on another machine (as long as you have administrative rights) using the psexec command included in the Sysinternals tools.

41. You can kill RDP sessions at the command line when you find that all the RDP sessions to a server are tied up.
regsvr32 query.dll [enter] You only have to do this the first time.
query session /server:servername [enter]
reset session # /server:servername [enter]

42. You can create a list of files and display the last time they were accessed, which is very useful when a network drive is low on space and users swear they have to have that copy of Office 2003 on the network. My advice? If they haven’t touched it in two years, burn it to DVD or write it to tape and then delete it from disk:
dir /t:a /s /od >> list.txt [enter]

43. The Microsoft Exchange Err command is one of the best all around troubleshooting tools you will find, as it can decode any hex error code you find as long as the products are installed on the machine. Download it from here.

44. You can see all the open files on a system by running this command:
openfiles /query

45. You can pull all the readable data out of a corrupt file using this command:
recover filename.ext

46. Need to pause a batch file for a period of time but don’t have the sleep command from the old resource kit handy? Here’s how to build a ten second delay into a script:
ping -n 10 127.0.0.1 > NUL 2>&1

47. If your Windows website has stopped responding, or is throwing a 500 error, and you are not sure what to do, you can reset IIS without having to reboot the whole server. Run this command:
iisreset

48. You can use && to string multiple commands together; they will run sequentially.

49. If you find yourself restarting services frequently, you can use that && trick to create a batch file called restart.cmd and use it to restart services:
net stop %1 && net start %1

50. You can download a Windows port of the wget tool from here, and use it to mirror websites using this command:
wget -mk http://www.example.com/


Linux


51. You can list files sorted by size using this command:
ls –lSr

52. You can view the amount of free disk space in usable format using this command:
df –h

53. To see how much space /some/dir is consuming:
du -sh /some/dir

54. List all running processes containing the string stuff:
ps aux | grep stuff

55. If you have ever run a command but forgot to sudo, you can use this to rerun the command:
sudo !!

56. If you put a space before a command or response, it will be omitted from the shell history.

57. If you really liked a long command that you just ran, and want to save it as a script, use this trick:
echo “!!” > script.sh

10 Best and free remote desktop sharing software's


Logmein Free
Logmein Free Provides access and control of remotely located workstations with complete liberty. Logmein Free helps you to access any computer seamlessly and gives facility to control your peripherals like Keyboard and Mouse. Logmein is very popular, fast and secure remote control utility for your computers. Using free version of Logmein you can only access the computer and work on it, and can be upgraded to pro version with many more facilities.

Frees Remote Desktop Sharing Software
Team Viewer Easy to work solution for desktop sharing, remote control and file transfer. Team Viewer also works with iPhone/Android app that you can use to access remotely located computers from your phone Device. it is free to user for non-commercial use. To make it work you have to install the Team Viewer software on both machines.

Frees Remote Desktop Sharing Software
Real VNC It is a desktop sharing and remote control software which allows you to see and interact with the remote computers using a trouble-free application anywhere on the Internet. You can also use Real VNC to view and control a Linux machine on your Windows PC. Real VNC is of no charge and free to download. You have to use the server version software on the computer to be controlled, provide a Secure Password initially and use the viewer version software on the controlling computer.

Frees Remote Desktop Sharing Software
Tight VNC An enhanced version of VNC, optimized to work on slow bandwidth networks like a low-speed modem connections. Using TightVNC you can access your workstations remotely using client application and even with a web browser (Java based). It works well with both windows and Unix systems.

Frees Remote Desktop Sharing Software
Ultra VNC Also known as UVNC is an open source software for the Windows OS. You can use it to connect remotely situated computers over the Internet or internal network. It enables you to control your remote workstations using mouse and keyboard. Recommended for computer support providers to quickly connect and resolve your customer's issues remotely.    
         

Ammyy Admin Remote Desktop Sharing
Ammyy Admin Ammyy Admin is a dependable, quick, secure and friendly application for remote desktop control and sharing. It connects remotely located computers in seconds with no extra installation and configuration. You can look into or control applications running on the remote workstations and transmit Files and Folders

Frees Remote Desktop Sharing Software
Anyplace Control Secure and easy to use remote desktop utility which allows you to view the desktop of remote computer and manage that computer from anywhere, using your own mouse and keyboard in real-time. The remote workstations can be connected over LAN, WiFi and Internet. Comes with Host Module and Admin Module. If you want to access a PC of the person who is not a computer savvy, just forward them a web-link and desktop becomes available on a single click


Frees Remote Desktop Sharing Software
CrossLoop It provides secure, fast, user-friendly interface and free of charge facility to access your home or office computers. Once you install the application and whenever you initiate the application, your workstation will be provisioned with a 12-digit access code, you can then forward that access code to other user who is sharing his/her desktop.


Frees Remote Desktop Sharing Software
SkyFex A free web based remote desktop assistance, you can access remote workstations directly using a web browsers and it requires no extra software installation and configuration. Some of the features are; SkyFex can be integrated to your website, Supports dual monitors, give presentations, Allows Remote reboot, file transfer, Integrated text chat and many more.

Frees Remote Desktop Sharing Software
DesktopNow Provides access to your workstations and laptops using Internet connection by sharing special folders you can download or upload files to. Using DesktopNow, you will experience fast and easy access to all your essential files from anywhere. It uses a secure SSL connection and require no additional router configuration

List of Best and free Software, Utility and Tool for System Administrators

Process explorer
Process monitoring tool for windows operating systems, unlike task manager it provides vast amount of information for running process and  detailed information on DLLs, threads, handles and TCP/IP connections. It is a advanced process management utility and replacement for task manager

Belarc Advisor 
A 3402 Kilo Bytes file size of free tool to do your system inventory . The software builds a in-depth profile of installed hardware and software, network, Installed hotfixes, status of anti-virus , you can use your Web browser to view the details.
  • Works with Operating systems:  Server (Both 32 and 64 bit) : Windows server 2012, 2008, 2003 Windows 8, Windows 7, windows 2008 R2,  Windows Vista, Windows server 2008, Window server 2003, XP, 2000, NT 4, Me, 98, and 95. Both 32-bit and 64-bit Windows are supported.
  • Works with browser Versions : Internet Explorer, Firefox, Safari, Opera, and others.
Link : http://www.belarc.com/free_download.html

Norton removal tool
Tool is used to  uninstall Norton AntiVirus, Norton Internet Security, Norton 360, and Norton SystemWorks 12.0 from your computer. If you use ACT! or WinFAX, back up those databases before you proceed.

Link : http://support.norton.com/sp/en/in/home/current/solutions/kb20080710133834EN_EndUserProfile_en_us/
MyDefrag-4.0 
Completely automated and easy to use, quick, low overhead, with several optimization strategies, and also works for floppies, USB disks, memory sticks, and anything else that looks like a disk to Windows. It is a simple tool which can defragment and optimize the windows 2000/2003/XP/Vista/2008/X64.
Comes with different versions as below
  • JkDefrag.exe - Windows Version
  • JkDefragCmd.exe - Commandline version
  • JkDefragScreenSaver.scr + JkDefragScreenSaver.exe -Screen saver version.
Link: kessels.com

PING [Partimage Is Not Ghost ] 
Best tool for Linux system rescue and windows with the below features
  • Backup and restores Locally or network files and partition
  • Can be used to backup Bios and restoration bootable DVD 
  • Backup MS Network Shared directory, NFS, FTP or SSHFS 
  • Creates bootable DVD
  • Partitions and Format a disk for installing Windows 
Link: http://ping.windowsdream.com

SuperScan
A vigorous utility known as  SuperScan is a TCP port scanner, which also includes list of other additional networking tools like ping, traceroute, HTTP HEAD, WHOIS and many more. Can be used to perform ping scans and port scans for any IP range or specify a text file to extract addresses from. Other features include TCP SYN scanning, UDP scanning, HTML reports, built-in port description database, Windows host enumeration, banner grabbing and more.
Download link: http://www.snapfiles.com/get/superscan.html

Windows Sysinternals 
Provides a list utilities useful to troubleshoot, manage, and diagnose your Windows systems and applications.
Links : http://technet.microsoft.com/en-us/sysinternals/default.aspx

VirtualBox
Free Open source server, desktop virtualulization utility from Oracle 
  • List of Supported host operating systems : Linux, Mac OS X, Windows XP, Windows Vista, Windows 7, Windows 8, Solaris, and OpenSolaris; there is also a port to FreeBSD.[3] 
  • List Supported guest operating systems :  versions and derivations of Windows, Linux, BSD, OS/2, Solaris and others. The release 3.2.0, VirtualBox allows to virtualize  Mac OS X guests on Apple hardware, OSX86 can also be installed .
Download Link: virtualbox

Everything from Voidtools
It is a simple, easy to use and free utility . Shows faster and  better search results as compared to  the built in Windows search.  An administrative tool to locates files and folders by filename for Windows. It is a Freeware
Works with Operating System : Windows 2000, XP, 2003 and Vista and Windows 7
Drawbacks of using : Only search local Files and folders and Removale NTFS volumes. To search for Netwok drive you need to install it on both local and network computers and start ETP server, does not search contents it  only works for files and folders names

WinDirStat and KDirStat
WinDirStat is a disk monitoring and clean up utility for Windows operating systems. On loading it takes a while to read the complete directory tree once and then presents it in three useful views:
The directory list sorts like Windows Explorer but it is sorted by file/subtree size
The treemap displays complete contents of the directory tree
The extension list, Display statistics about the file types.
KDirStat is a GUI () disk usage utility for Linux, BSD, and  other Unix-type systems like Solaris. it provides cleanup facilities to reclaim disk space.
Download Link: http://windirstat.info/

Wireshark 
A very popular, free and open source tool used for Network troubleshooting  It capture the packets from Network traffic which is helpful in troubleshooting purpose i network related issues. Network Administrator's read the live packet capture or can also save the capture.
Compatible with  Linux, OS X, BSD, and Solaris and Microsoft Windows.
Link: http://www.wireshark.org/

UltraTech Knowledgebase Viewer
UltraTech Knowledge base viewer provides  list of  tools and their links. It has list of  KB CONTENTS, not well updated but good for the beginner who are looking for good technical links
Link: http://kb.ultratech-llc.com

How to Backup/Restore Internet Information Services using GUI or Command line for IIS 6 and IIS 7

Here is a step-by-step method to take IIS back, remember taking IIS backup is very important before modifying or doing any changes on the IIS based website and virtual directory 
 

IIS 6.0


The First method is by using GUI Mode

1) Open Internet Information services (IIS) Manager

IIS Console




















2) Right Click the server name and click on All Tasks and select Backup/Restore Configuration


IIS Backup All Task

















3) Click on Create Backup option to take backup
Create IIS Backup













4) Type the backup name in the Configuration Backup Name
Create IIS Backup using GUI













5) If you want to Encrypt/ Password Protect the backup file, Select the option: Encrypt backup using Password and provide password of your choice
Note: Remember the password to be used during restore.
Protect IIS backup File













6) Click on OK and you are done

7) While restoring the backup just select the Backup Name you want to restore and click on Restore option

8) The same way if you want to delete any existing backup, use Delete option
Add Backup Name













The second method to take IIS 6 backup is by using the command Line

1) Open a command prompt
2) Run the command as you see in the below example
Example command : Cscript.exe iisback.vbs /s <YourServerName> /u Administrator /p  <YourAdminPassword> /backup /b NewBackupName

IIS6 backup command


IIS 7



Method Using command 

To backup IIS configuration:
%windir%\system32\inetsrv\appcmd.exe add backup "Backup-Name"

To restore that backup:
%windir%\system32\inetsrv\appcmd.exe restore backup "Backup-Name"

To delete a backup:
%windir%\system32\inetsrv\appcmd.exe delete backup “Backup-Name"

IIS 7  Backup command

IIS 7 Restore

Once the backup command is successful, the files can be verified in the default location C:\windows\system32\intersrv\backup\Backup-Name

IIS 7 backup/restore






Tuesday, May 20, 2014

MICROSOFT EXCEL SHORTCUT KEYS

The followings are Microsoft Excel shortcuts. Some short-cuts might be version specific.
Use at your own risk. 
Mouse shortcuts

ShortcutDescription
Double-click (on a cell)Edit the cell contents.
Double-click (on a row/column divider)Adjust height/width to auto-fit
High-light headers of multiple rows/columns then Double-click on a row/column dividerAdjust height/width to auto-fit of all high-lighted rows/columns
Triple-clickSelect the entire contents in the cell
Click on row/column divider then dragAdjust height/width of the row/colunn
High-light headers of multiple rows/columns then Click on row/column divider then dragAdjust height/width of the rows/colunns
Ctrl + Mouse wheelZooms in and out of document.
Hold Shift + Click the cellsSelect multiple cells


Keyboard shortcuts

ShortcutDescription
F2Edit the selected cell.
F5Goto a specific cell. For example, C6.
F7Spell check selected text and/or document.
F11Create chart.
Ctrl + ASelect all.
Ctrl + BBold.
Ctrl + CCopy.
Ctrl + FFind (same as Shift + F5).
Ctrl + GGo To.
Ctrl + HReplace.
Ctrl + IItalic.
Ctrl + KInsert link.
Ctrl + NNew Workbook.
Ctrl + OOpen Workbook.
Ctrl + PPrint dialog.
Ctrl + SSave.
Ctrl + UUnderline.
Ctrl + VPaste.
Ctrl + ZUndo.
Ctrl + YRedo.
Ctrl + XCut.
Ctrl + 5Strikethrough text.
Ctrl + F3Define Name.
Ctrl + F4Exit Excel.
Ctrl + F6Switch between open workbooks.
Ctrl + F9Minimize current window.
Ctrl + F10Maximize current window.
Shift + F1Activate Help on Item.
Shift + F2Insert Comments
Shift + F3Insert Function.
Ctrl + Shift + ;Enter the current time.
Ctrl + ;Enter the current date.
Ctrl + Page downMove to next worksheet.
Ctrl + Page upMove to previous worksheet.
Ctrl + Shift + #Number Format: Date
Ctrl + Shift + @Number Format: Time.
Ctrl + Shift + !Number Format: Commas.
Ctrl + Shift + $Number Format: Currency
Ctrl + Shift + %Number Format: Percentage
Ctrl + Shift + ^Number Format: Scientific.
Ctrl + SpaceSelect entire column.
Shift + SpaceSelect entire row.
Ctrl + (Arrow key)Move to next section.