Running commands on remote servers

We have many citrix servers, but whenever I need to run one simple command I hate to go to all my citrix servers to run on. I wish I could just connect to one server, and access the command line for all the other server. Well you can, as I soon learned with psexec. It’s a Microsoft tool (formerly sysinternals), and you can download it here.  Below is how you use it. psexec \\RemoteComputer...
readmore

Repairing file associations

Have two versions of the same software that open the same file extension? Having trouble getting windows to open the right one. We had this same problem with Crystal reports (.rpt extension), but setting it in the file types options in windows did not work. However the bottom command worked in our citrix farm. Don’t put this is a batch file because the %1 doesn’t flow...
readmore

Rename a file with a date/time stamp

The following code will allow you to rename a file to the date and time. Save this code in a batch file (in this example we’ll call it rename_it.cmd), then call it with the file that needs to be renamed. You can also download it here, rename_it.cmd. Example: rename_it FILENAME.txt @Echo OFF TITLE DateName REM DateName.CMD REM takes a filename as %1 and renames as %1_YYMMDDHHMM REM REM...
readmore

Send your events log to sql

Recently I had to turning on auditing on a file server. However turning on auditing was fine but what to do with the logs. The max recommended size for logs are 65Mb. However within 4 hours I was hitting that 65MB limit, and my oldest logs would start erasing. There are some tools out there that can help you, but nothing beats building your own. While I was researching how to archive my logs in a...
readmore

Deleting old files based on date in command line

Need to delete old files based on how old the file is? Need to do in a batch file? Well there’s a great program developed by these guys http://winhlp.com/node/386. Only thing is you need to have java loaded on the machine you are running the command from. The program is accessible via command line and all you need is the below command. The last number in the command is how many days old....
readmore

line
footer