This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: http://technet.microsoft.com/en-us/library/bb490894.aspx | |
:: F7 = history | |
:: Alt+F7 = history -c | |
:: F8 = Ctrl+R | |
:: Use & to run multiple commands e.g.: command1 & command2 | |
:: Add this file as a REG_SZ/REG_EXPAND_SZ registry variables in HKEY_LOCAL_MACHINE\Software\Microsoft\Command or Processor\AutoRun HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun | |
@echo off | |
:: Linux commands | |
doskey alias = doskey $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Add Site | |
appcmd add site /name:MySite /bindings:http://*:80 /physicalpath:”d:\MySitePath” | |
2. Add App Pool | |
appcmd add apppool /name:MyAppPool /managedRuntimeVersion:v4.0 (e.g. targeting .NET 4.0) | |
3. Set App Pool Credential | |
appcmd set config /section:applicationPools /[name='MyAppPool'].processModel.identityType:SpecificUser /[name='MyAppPool'].processModel.userName:MyDomain\MyAccount /[name='MyAppPool'].processModel.password:MyAccountPassword | |
4.Add App | |
appcmd add app /site.name:"MySite" /path:/MyApp /physicalpath:"d:\MySitePath\MyApp" | |
5. Assign/Change App Pool to an App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sqlcmd | |
-a packet_size | |
-A (dedicated administrator connection) | |
-b (terminate batch job if there is an error) | |
-c batch_terminator | |
-C (trust the server certificate) | |
-d db_name | |
-e (echo input) | |
-E (use trusted connection) | |
-f codepage | i:codepage[,o:codepage] | o:codepage[,i:codepage] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH expression_name [ ( column_name [,...n] ) ] | |
AS | |
( CTE_query_definition ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE AdventureWorks2008R2; | |
GO | |
SELECT objtype, objname, name, value | |
FROM fn_listextendedproperty(default, default, default, default, default, default, default); | |
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
powershell -command "G:\Karan\PowerShell_Scripts\START_DEV.ps1 Dev" | |
and inside your script head: | |
$w=$args[0] | |
This if you want to use the built-in variable $args. Otherwise: | |
powershell -command "G:\Karan\PowerShell_Scripts\START_DEV.ps1 -w \"Dev\"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code = { | |
#iterate numbers 1 through 10 | |
1..10 | foreach-object { | |
# just output them | |
"Current output:" | |
$_ | |
} | |
} | |
Then use this PowerShell command to get the encoded version: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Syntax | |
findstr [/b] [/e] [/l] [/r] [/s] [/i] [/x] [/v] [/n] [/m] [/o] [/p] [/offline] [/g:file] [/f:file] [/c:string] [/d:dirlist] [/a:ColorAttribute] [strings] [[Drive:][Path] FileName [...]] | |
Top of page | |
Parameters | |
/b : Matches the pattern if at the beginning of a line. | |
/e : Matches the pattern if at the end of a line. | |
/l : Uses search strings literally. | |
/r : Uses search strings as regular expressions. Findstr interprets all metacharacters as regular expressions unless you use /l. | |
/s : Searches for matching files in the current directory and all subdirectories. | |
/i : Specifies that the search is not to be case-sensitive. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chmod +x filename.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat file2 >> file1 |
OlderNewer