Last active
May 8, 2020 11:53
-
-
Save thost96/864de2a9ad61c54c097b0644d1c454ff to your computer and use it in GitHub Desktop.
Windows Comand Line Aliases
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
:: https://gist.github.com/PierreMage/6874814#file-doskey-bat-L30 | |
:: https://stackoverflow.com/questions/4186427/how-do-you-write-comments-in-doskey-macro-files | |
:: https://superuser.com/questions/247548/doskey-for-compound-command/788209 | |
@echo off | |
:: 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 | |
:: Use $T to run multiple commands e.g.: command1 $T command2 | |
:: F7 = history | |
:: Alt+F7 = history -c | |
:: F8 = Ctrl+R | |
:: administrative commands | |
doskey admin = powershell.exe -Command "Start-Process cmd \"/k cd /d %cd%\" -Verb RunAs" $T exit | |
doskey sudo = powershell.exe -Command "Start-Process $* \"/k cd /d %cd%\" -Verb RunAs" | |
doskey su = powershell.exe -Command "Start-Process $* \"/k cd /d %cd%\" -Verb RunAs" | |
:: system commands | |
doskey ls = dir | |
doskey ll = dir | |
doskey la = dir /Q | |
doskey clear = cls | |
doskey cp = COPY $* | |
doskey mv = move $* | |
doskey pwd = cd | |
doskey .. = cd ..\ | |
doskey cat = type $* | |
doskey rm = del $* | |
doskey rmr = deltree $* | |
doskey ping = ping -t $* | |
doskey grep = find $* | |
doskey man = help $* | |
doskey rdp = mstsc -v $* | |
:: network configuration | |
doskey ifconfig = netsh interface ip show addresses "Ethernet" | |
doskey dhcp = netsh interface ipv4 set address name="Ethernet" source=dhcp | |
doskey static = netsh interface ipv4 set address name="Ethernet" static $* | |
doskey dns = netsh interface ipv4 set dns name="Ethernet" static $* | |
doskey wlan-dhcp = netsh interface ipv4 set address name="WLAN" source=dhcp | |
doskey wlan-static = netsh interface ipv4 set address name="WLAN" static $* | |
doskey wlan-dns = netsh interface ipv4 set dns name="WLAN" static $* | |
:: Putty | |
doskey ssh = putty.exe -ssh $* | |
doskey telnet = putty.exe -telnet $* | |
doskey console = putty.exe -serial $* | |
doskey serial = putty.exe -serial $* | |
doskey tty = putty.exe -serial $* | |
:: Visual Studio Code | |
doskey notepad = "C:\Users\reich\AppData\Local\Programs\Microsoft VS Code\Code.exe" $* | |
doskey np = "C:\Users\reich\AppData\Local\Programs\Microsoft VS Code\Code.exe" $* | |
doskey nano = "C:\Users\reich\AppData\Local\Programs\Microsoft VS Code\Code.exe" $* | |
:: Win32DiskImager | |
doskey dd = "C:\Program Files (x86)\ImageWriter\Win32DiskImager.exe" $* | |
:: Tftpd64 | |
doskey tftp = "C:\Program Files\Tftpd64\tftpd64.exe" -s c:\temp\ | |
doskey tftp-server = "C:\Program Files\Tftpd64\tftpd64.exe" -s c:\temp\ | |
:: Web | |
doskey google = start https://www.google.com/?#q=$* | |
doskey web = start http://$* | |
doskey http = start http://$* | |
doskey https = start https://$* | |
:: FileZilla | |
:: https://wiki.filezilla-project.org/Command-line_arguments_(Client) | |
doskey ftp = "C:\Program Files\FileZilla FTP Client\filezilla.exe" ftp://$* | |
doskey sftp = "C:\Program Files\FileZilla FTP Client\filezilla.exe" sftp://$* | |
:: FileZilla Server | |
:: https://wiki.filezilla-project.org/Command-line_arguments_(Server) | |
doskey ftpserver = "C:\Program Files (x86)\FileZilla Server\FileZilla Server.exe" $T "C:\Program Files (x86)\FileZilla Server\FileZilla Server Interface.exe" | |
doskey ftp-server = "C:\Program Files (x86)\FileZilla Server\FileZilla Server.exe" $T "C:\Program Files (x86)\FileZilla Server\FileZilla Server Interface.exe" | |
:: SolarWinds sftp | |
doskey sftpserver = powershell.exe -Command "Start-Process \"C:\Program Files (x86)\SolarWinds\SftpServer\ScpServerTray.exe\" -Verb RunAs" | |
doskey sftp-server = powershell.exe -Command "Start-Process \"C:\Program Files (x86)\SolarWinds\SftpServer\ScpServerTray.exe\" -Verb RunAs" | |
:: DHCP Server | |
doskey dhcp-server = "C:\OpenDHCPServer\OpenDHCPServer.exe" -v | |
:: ASU Tool | |
doskey asu-sn = "C:\Users\reich\Desktop\Tools\ASU-Tool\asu64.exe" set SYSTEM_PROD_DATA.SysInfoSerialNum $* | |
doskey asu-pn = "C:\Users\reich\Desktop\Tools\ASU-Tool\asu64.exe" set SYSTEM_PROD_DATA.SysInfoProdNames $* | |
:: BoMC | |
doskey bomc = powershell.exe -Command "Start-Process \"C:\Users\reich\Desktop\Tools\lnvgy_utl_lxce_bomc01q-11.7.0_windows_i386.exe\" -Verb RunAs" | |
:: IPMIutil | |
doskey ipmiutil = "C:\Users\reich\Desktop\Tools\IPMIUTIL\ipmiutil.exe" $* | |
:: HELP | |
doskey help = powershell.exe -Command "Get-Content C:\Users\%username%\DOS_Keys.bat" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment