Use iCacls to set permissions on a directory and all sub-directories

icacls “C:\Program Files\My Folder\” /T /C /grant “Domain Users”:(OI)(CI)M Read more at: http://technet.microsoft.com/en-us/library/cc753525(WS.10).aspx http://ss64.com/nt/icacls.html

Test TCP Utility (TTCP)

If you ever needed to test the throughput or bandwidth of your LAN or WAN, here is a small utility that will allow you to truly see what the network speed is working at. Prerequisite: PsTools, specifically PsExec must be available on your computer.  Dropping all the “Ps” tools into your %PATH% is recommended. Download [...]

Delete Event Viewer Logs in Windows 7

Quick and easy way to delete your Event Viewer Logs in Windows 7. @echo off for /F “tokens=*” %%G in (‘wevtutil.exe el’) DO (call :clear_it “%%G”) echo. echo Event Logs have been cleared! ^<press any key^> goto fin :clear_it echo %1 – CLEARED wevtutil.exe cl %1 goto :eof :fin pause>NUL Note: You must run this [...]

Reduce Winsxs folder size after Windows 7 SP1 install

Quick tip on how to reduce your Winsxs folder on your Windows 7 drive after you have installed SP1. Open an elevated Command Prompt and type the following command: DISM /online /Cleanup-Image /SpSuperseded I have seen varying reports on how much this will reduce your WinSXS folder, but I’ve seen reports for as much as [...]

Query and terminate Remote Desktop sessions

Open the command prompt.  Type: qwinsta /SERVER:<SERVERNAME> This command will query the server and report the existing connections.  Find the ID of the session you would like to terminate.  Then, run the following command to terminate that session. rwinsta <ID> /SERVER:<SERVERNAME> This will terminate the session.

How to create a unique filename with date / time in filename

This little snippet of code will allow you to set a filename based on date and time.  This comes in handy if you ever need to create backup files. for /f “delims=/ tokens=1-3″ %%a in (“%DATE:~4%”) do ( for /f “delims=:. tokens=1-4″ %%m in (“%TIME: =0%”) do ( set FILENAME=basename-%%c-%%b-%%a-%%m%%n%%o%%p ) )

Easily create dummy file to be used for testing or benchmarking

The fsutil is a powerful utility that can be used for many tasks on FAT and NTFS file systems.  Please see the link below for more details on the usage of this utility.  This post will simply provide instructions on how to create a dummy file which you could use, say testing your ASP or [...]

Diruse – Command line tool that displays directory size information

DIRUSE is a great command-line utility for Windows XP.  Running this utility allows you to quickly generate a report of disk/directory size.  This works on your local drives, as well as network drives. Example: diruse /s /M /, /* /D /Q:500 c:\windows This will output all the directories in the C:\Windows folder that are over [...]

Follow

Get every new post delivered to your Inbox.