2013년 1월 8일 화요일

Powershell Shortcuts



(Alt) +(F7) Deletes the current command history
(PgUp) , (PgDn) Display the first (PgUp) or last (PgDn) command you used in current session
(Enter) Send the entered lines to PowerShell for execution
(End) Moves the editing cursor to the end of the command line
(Del) Deletes the character to the right of the insertion point
(Esc) Deletes current command line
(F2) Moves in current command line to the next character corresponding to specified character
(F4) Deletes all characters to the right of the insertion point up to specified character
(F7) Displays last entered commands in a dialog box
(F8) Displays commands from command history beginning with the character that you already entered in the command line
(F9) Opens a dialog box in which you can enter the number of a command from your command history to return the command. (F7) displays numbers of commands in command history
(Left arrow) ,(Right arrow) Move one character to the left or right respectively
(Arrow up) , (Arrow down) , (F5) , (F8) Repeat the last previously entered command
(Home) Moves editing cursor to beginning of command line
(Backspace) Deletes character to the left of the insertion point
(Ctrl) +(C) Cancels command execution
(Ctrl) +(End) Deletes all characters from current position to end of command line
(Ctrl) +(Arrow left) , (Ctrl) +(Arrow right) Move insertion point one word to the left or right respectively
(Ctrl) +(Home) Deletes all characters of current position up to beginning of command line
(Tab) Automatically completes current entry, if possible

2013년 1월 4일 금요일

레지스트리읽기와 쓰기.


레지스트리 접근(레지스트리 내용은 디렉터리와 동일하게 접근)
HKEY_LOCAL_MACHINE : cd HKLM:
HKEY_CURRENT_USER : cd HKCU:

레스스트리 읽기, 쓰기
PS > Get-ItemProperty 키이름
PS > Set_ItemProperty 위치 -name 키이름 -value 키값

exe 실행하기


$xFilePath = "D:\nexusfile\"

$excute = $xFilePath + "x.exe"

&$excute

머 이렇게 하면 excute함수가 실행된다 & 붙여야되는것을 몰랐던것이다... ㅋㅋ


아 참고로 아귀먼트가 있으면

$excute = "notepad.exe"
$arg = "readme_ko.txt"

&$excute $arg

이런식으로 하면 된다... 바보 같이 

$excute = "noepad.exe readme_ko.txt" 이렇게 해서 실행하면 안된다.