Poweshell command to rename a file leaving only the first two characters. (Note: If you want to do this again, it is easier to use neoedit to generate ren commands and run them in cmd):

Get-ChildItem . | Rename-Item -NewName { $_.Name -replace '^(?<g1>..).*$','${g1}.mp3' }

Find all files that contain a string:
/s : Searches for matching files in the current directory and all subdirectories.
/c: string : Uses specified text as a literal search string.

findstr /s /c:"STRING TO FIND" *.cs

Find a file in current directory and all subdirectories:

dir /b /s FILENAME

Find the full path to an executable. Equivalent to Linux’ which command:

for %i in (EXECUTABLENAME.EXTENSION) do @echo. %~$PATH:i

Restart all IIS websites:

iisreset /restart

System startup configration:


Edit the Windows registry:


List all network ports currently in use:

netstat -a: lists all ports currently in use

View password policy that applies to a computer

net accounts

Get the password (or other info from the ProcessModel) of the user running an IIS app pool:

appcmd list apppool "AppPoolNameHereInsideDoubleQuotes" /text:ProcessModel.Password

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s