Академический Документы
Профессиональный Документы
Культура Документы
11 Free tools that will make your life easier as a Windows Network Administrator By Steve Wiseman
Revision 8/14/2012
http://www.intelliadmin.com
Table of contents
Read This First a note about Windows file and printer sharing ................ 3 Burn CDs and DVDs from the command line ............................................... 4 Cron Server for Windows .............................................................................. 6 Logoff, Lock or Shutdown Idle Computers .................................................. 11 View the history of USB flash drives on a computer ................................... 13 Wifi Strength Meter..................................................................................... 14 Allow users to easily see their local, or public IP ........................................ 16 Execute Processes Remotely ....................................................................... 19 Detect RDP Sessions from a bat file ............................................................ 23 Extract VNC passwords remotely ................................................................ 25 Open a command prompt in any folder ...................................................... 27 Network Administrator Free edition with over 30 plugins ...................... 30
http://www.intelliadmin.com
Read This First a note about Windows file and printer sharing
Many of the free applications we offer require access to file and printer sharing. Each version of Windows handles this differently. We have put together guides that will walk you through enabling it on your computers: Windows XP: http://www.intelliadmin.com/index.php/2008/12/enabling-file-and-printer-sharingin-windows-xp/ Windows Vista, 2008: http://www.intelliadmin.com/index.php/2008/12/enabling-file-and-printer-sharingin-vista/ Windows 7, 2008 R2: http://www.intelliadmin.com/index.php/2009/08/windows-7-the-admin-share/
http://www.intelliadmin.com
Where E: is the DVD/CD drive letter, and C:\Backup is the folder you want to back up. It will automatically set the volume name to the current date. It will then zip through your specified folder and burn the contents to the CD or DVD:
You can use the ERRORLEVEL value for conditional statements in your batch file.
http://www.intelliadmin.com
Here is an example bat file that checks the result of the BurnDisk.exe output:
@ECHO OFF REM Backup our files to DVD or CD ROM burndisk.exe e:\ c:\Backup REM Check our result IF %ERRORLEVEL%==0 goto COMPLETE REM ERROR HANDLING HERE :COMPLETE
This is version 1.0, so please let us know what Must Have features you want to see in the next version. (Send an email to support@intelliadmin.com) It has been tested on Windows Vista, 2008, and 7. Download it from here: http://www.intelliadmin.com/burndisk.exe
http://www.intelliadmin.com
It is true you can use the Windows task scheduler, but it is difficult to transfer scheduled tasks from one computer to another. You could copy the folder c:\windows\tasks, but this is totally unsupported and it does not always work. That is the beauty of Cron. Every bit of scheduling info is contained within the Crontab file. If you want a group of servers to have the same scheduled jobs, you just need to sync this file. No registry hacks, no tricks - Just one file. Not only that, since it is just a text file you can easily schedule jobs from PHP, PowerShell or VBScriptwithout any ActiveX or hooks into Windows. You just need to modify a simple text file.
http://www.intelliadmin.com
It includes utility for editing the cron file, so if you dont have to look up the specs to schedule a job:
Once you install the application, you might be interested in editing the crontab file. By default it is located in: C:\Program Files\IntelliAdmin\Cron
http://www.intelliadmin.com
The file is named crontab. It roughly follows the same format as the Unix crontab, except we have added the [FLAGS] option: [M] [H] [D] [M] [WD] [FLAGS] [Process Name] [Process Arguments] M The minute that the process should be executed (0-59) H The hour that the process should be executed (0-23) D The day that the process should be executed (1-31) M The month that the process should be executed (1-12) WD The day of the week that the process should be executed (06 Sunday = 0, Monday = 1, Etc) FLAGS Windows process execution flags (See the end of the chapter for an explanation) Each section can: -Have a range of values like this: 12-24 (All items from 12 to 24) -Have a list of values like this: 12,13,14,15 -Include all possible values like this: * -Skip values using the / like this: 0-59/5 (This would only include 0,5,10,15,20,etc) Lets put it all together. If we wanted a process to run every 5 minutes we would create a line like this in our crontab file: */5 * * * * "c:\windows\system32\cmd.exe" "/c c:\test.bat" See how the skip value works? We specified the * for the minute section (All minutes), and then told it to skip 5. This means it will run at 0, 5, 10, 15, 20, etc.
http://www.intelliadmin.com
If you wanted to run a process every Sunday at 1 pm: 00 01 * * 00 c:\process.bat Or how about, only every Sunday from June to the end of the year:
00 01 * 06-12 00 "c:\test.bat"
It takes a little time to get used to the format, but once you do it is a breeze to work with. A few things to think about when using this: -Make sure you secure the crontab file by only allowing System and Administrator write access. Otherwise a standard user could simply alter the crontab file and start running stuff as an administrator -The programs are run in the context of a service if no flags are set. By default the user account is System, and for security reasons it does not have network share access. If you want to allow access to network shares use the flags to change the context the application is run in -Since it is a service, if your program pops up forms, or message boxesit will have to run in some session. Either the console session, or an RDP session. (Using flags)
http://www.intelliadmin.com
Here is an explanation of how flags work: The flag is a number, and it indicates how the process should be executed: 1 = The process is executed as an administrator 2 = The process is executed as the session user. 4 = The process is hidden when executed. 8 = The process is executed in the console session. 16 = The process will only be executed if someone is logged into the console. 32 = The process will be executed in all RDP sessions. 64 = This will disable the job. If you wanted the program to run as administrator in all the current RDP sessions you would use: 33 This is calculated by adding the options together32+1 If you wanted the program to run in the console as the current user, but only if someone was logged in, it would be: 2 + 16 + 8 = 26 If no flag is set, or you set it to zero, the application will run as system and under Vista and higher, it cannot show any message boxes or windows. We are always improving our software, so if you have any suggestions please feel free to send us an email at support@intelliadmin.com Download it from here: http://www.intelliadmin.com/iadmincron.exe
http://www.intelliadmin.com
This utility was created after an email from Tracy: Hi Steve. Love all the tools and tips you keep sending our way. Got a question. Is there any easy way to logoff a user when they are not active for say, 15 Minutes? I spoke with Tracy further to explain that forcing a logoff could cause data loss. For example, a user has a Word document open and they walk away. Then boom the forced logoff happens and their document is gone.
In her case she needs it for public facing kiosks. If one of the technicians walks away, it leaves the system wide open. Locking the workstation for this situation is bad too since it makes it so the customer cannot use the machine. Here is how it works, you call the program like this:
idlelogoff.exe [timeout] [action] timeout - The number of idle seconds before the action is taken action - [logoff / lock / shutdown] You can lock the workstation, log the user off, or shutdown the workstation.
http://www.intelliadmin.com
If you wanted a user to get booted off after 5 minutes (300 Seconds) of no activity, You would call it like this:
idlelogoff.exe 300 LOGOFF
If you wanted it to lock the workstation after 30 seconds of no activity this would do the trick
idlelogoff.exe 30 LOCK
If you wanted it to shutdown the workstation after 30 seconds of no activity this would do it:
idlelogoff.exe 30 SHUTDOWN
It has some sanity checking for the timeout. Anything less than 10 seconds is set to 10 seconds. Call it from the users startup script to make sure it is active while they are logged in. Get it from here: http://www.intelliadmin.com/idlelogoff.exe
http://www.intelliadmin.com
Not only that, but you can even point it at a remote machine and get its USB history too. Download it from here: http://www.intelliadmin.com/USBHistoryView.exe
http://www.intelliadmin.com
If you are in a crowded area, you can easily narrow down the network names shown by just typing in the filter box at the bottom:
http://www.intelliadmin.com
You can also export the list to a CSV file by clicking the export button:
http://www.intelliadmin.com
After its initial release, A few of you had some great suggestions. Jean-Franois asked us to add a public IP option, so we did:
http://www.intelliadmin.com
http://www.intelliadmin.com
Jenny wanted us to put all the info in a tool tip so users dont even have to click on the starso we added that too:
New command line options were added to manage these features: /no_public_ip Disables the public IP option. Important if you dont want the program to hit our servers when it is run /no_url Removes the IntelliAdmin link at the top of the main form. /no_exit_menu Removes the exit menu You can get it from here: http://www.intelliadmin.com/systeminfo.exe
http://www.intelliadmin.com
http://www.intelliadmin.com
Here is the command line format for Remote Execute: RemoteExecute.exe -h [host] -u [user] -p [pass] [options] [filename] [arguments] Options: -h The remote host name or IP -u Username * -p Password * -e Don't load users environment variables -l Don't load users profile -c Copy file to the remote host -cs Run process in the console session -n Run process as hidden -sf [filter] Run in session where [filter] matches the user -i Return immediately, and don't wait for it to terminate -sa Run process under the system account -su Run process as the session user -q Quiet mode * - Required options Let us start out with a simple example: You want to get a remote command line on a remote Windows 2000 machine with the IP address 10.10.10.146. What are the arguments to do this? RemoteExecute.exe -h 10.10.10.146 -u administrator -p password %systemroot%\System32\cmd.exe
http://www.intelliadmin.com
See, Now on my Windows 7 machine it drops down to that remote computers command prompt:
If you wanted to run a script as the current console user, it would look like this: RemoteExecute.exe -su -cs -h 10.10.10.146 -u administrator -p password c:\temp\test.vbs
These two options are what enabled this to happen: -su Tells it to run as the current session user instead of you -cs Tells it to execute the application in the console session If you wanted to copy that c:\temp\test.vbs over to the remote host, just add the -c option like this: RemoteExecute.exe -c -su -cs -h 10.10.10.146 -u administrator -p password c:\temp\test.vbs
http://www.intelliadmin.com
What about that terminal server? Lets say you have a user named mike logged into that server and want to run a script that remaps all his printers. The command line would look like this: RemoteExecute.exe -su -sf mike -h 10.10.10.146 -u administrator -p password c:\Code\ReMapPrn.bat -su This option tells it to run as mike, not the administrator. This will allow our printer mapping to directly affect his account -sf This is the session filter. It tells it to find the first account matching the name mike The session filter argument can also take DOS style wildcards: RemoteExecute.exe -sf admin* -su -h 10.10.10.146 -u administrator -p password c:\Code\BigScript.bat Just keep in mind it will only execute on the first session that matches the wildcard. What if you have a batch file on your local machine that you want to have copied over to the remote machine? Just use the -c option, and it will copy the file and automatically take care of the rest:
RemoteExecute.exe -c -h 10.10.10.146 -u administrator -p password c:\Code\BigScript.bat
Make sure you always put your options first. The file you are going to execute, and its arguments always go last. Also, it recognizes vbs, and bat files. It automatically pipes them through the appropriate processor (cscript.exe or cmd.exe) so you dont have to. You can get the latest version from here: http://www.intelliadmin.com/remoteexecute.exe
http://www.intelliadmin.com
I originally thought that this could be easily detected by an environment variable, or even VB Scriptbut it turns out that those two methods are not reliable. The %SESSIONNAME% variable is set if you are on a terminal server. If you just RDP to the console of a workstation, or server it is empty.
http://www.intelliadmin.com
So instead, we put together a free utility called RDPDetect. It returns 1 if you are in an RDP session, and 0 if you are not. The return value can be picked up as an error level, so you can use it in a bat file like this:
@echo off RDPDetect.exe if ERRORLEVEL 1 goto RDP_ENABLED if ERRORLEVEL 0 goto RDP_DISABLED goto END :RDP_ENABLED echo This is a RDP Session goto end :RDP_DISABLED echo This is a not a RDP Session :END
http://www.intelliadmin.com
http://www.intelliadmin.com
You simply pick the machine you want to pull the password(s) from, enter your Windows username/password info (You can leave it blank if you want to use the account you are logged into)and press the start button. It will grab the password from the remote machine, decrypt it, and display it in the form. You can download it from here: http://www.intelliadmin.com/VNCPasswordView.exe
http://www.intelliadmin.com
Under this create a new key named cmd. Once created, double click on the default value on the right
http://www.intelliadmin.com
The text you type in here will be the description on the menu. I used Open Command Prompt Here. This is what it will look like when we are finished:
Under the cmd key you created, create another key named command Set the default value for this to cmd.exe /k cd %L && ver This is what it should look like in regedit:
http://www.intelliadmin.com
Now when you right click on a folder you can launch a command prompt right in it.
Now here is the bonus. We created a little application that will do this all for you
http://www.intelliadmin.com
We are giving away a free edition as part of this e-book that allows you to run an action against up to 3 computers at a time. Here is a list of some of the plugins we have right now: Report amount of free disk space
What computers are low on drive space? Network Administrator can help you find out Silently install the latest security patches
Want to make sure the latest security patches are installed? Network Administrator can silently download and install the latest critical, and security patches.
http://www.intelliadmin.com
See what user logged on to a machine last. Network Administrator can show you the account name, and the date and time. Send instant messages
Need to notify your users that the server is going down in five minutes? Dont mess with net send any longer. Network Administrator can send that message to users in a flash. Change network configuration
Want to switch 1000 hosts to DHCP? Have new DNS servers? No problem, with this plugin you can change them in a few clicks Daylight Saving Time Update
Easily update those older NT 4.1, Windows 2000, and XP machines to the latest DST settings without being forced to purchase a $5000 patch from Microsoft. Disable CDROM and DVD Drives
Keep users from installing unwanted software. Disable and enable their CDROM / DVD drives with ease. Disable CDROM and DVD Burning
Keep users from copying data off your network. Disable DVD and CD burning while allowing users to still have read only access.
http://www.intelliadmin.com
Having a problem with users sending Excel 2007 documents to people outside your network? Reduce those help desk calls by forcing all of your Excel 2007 users to automatically save in the 2003/XP format. Folder copy
Have a set of shortcuts you want to copy to everyones desktop? Or a configuration file you need to place on their C Drive? Use the folder copy plugin to copy files and folders to many machines in just a few clicks. Kill Processes
This plugin can kill a process by name across your network. Got a piece of spyware that uses a common filename, but keeps randomizing a prefex? Use the wildcard feature to zap them all Manage Services
Stop, Start, and modify services using the manage services plugin Change Power Management Settings
Save energy by making changes to the power management settings on computers across your network Remote Desktop Enabler
Have remote registry access to a remote machine, but remote desktop is disabled? Copyright 2012 - IntelliAdmin, LLC http://www.intelliadmin.com
Remote desktop enabler can turn on remote desktop so you can get into that machine asap. Remote Desktop Port Set
Want to change the port Remote Desktop uses to listen for connections? Use this plugin to change the port that Remote Desktop listens on. Remote Execute
Got an MSI file you want to install silently on 100 machines? Network Administrator can do it in a few clicks. Build batch files, or VBS files and easily execute them remotely. Set Local Administrator Password
Resetting the domain administrator password is easy, but what happens when an employee leaves the company and you have 50 machines with the same local administrator password? Normally, you would walk around to each one and change it. With the Set Local Administrator Password feature you can change it across your network without even getting out of your chair. Set VNC Password
Use Tight VNC, or Real VNC on your network? Need to change the password on a 100 or 1000 machines? Network Administrator can change them all in one sweep of your network. Reboot or Shutdown Computers
Quickly shutdown, or reboot computers. You can even set a time limit before your action takes place, and tell users why they need a reboot or shutdown.
http://www.intelliadmin.com
Prevent access to USB flash drives, while allowing USB based keyboards, mice, and scanners. Windows Autologon
Set windows to automatically logon as a specific username and password. Reset The Printer Spooler
Got a printer that corrupts printer jobs once in a while? Stop wasting time deleting them by hand. Use this plugin to quickly clear out the jobs and get printing again. We are adding features and plugins to this one all the time so make sure you are on subscribed to our newsletter to get the latest edition when it comes out. You can do that by visiting our site here: http://www.intelliadmin.com/index.php/subscribe/ Get the latest edition of Network Administrator from here: http://www.intelliadmin.com/NetworkAdministrator.exe Thanks for reading, and please feel free to send us comments or suggestions to support@intelliadmin.com
http://www.intelliadmin.com