EN 
21.01.2025 Běla WELCOME IN MY WORLD

This website is originally written in the Czech language. Only part of the content is machine (AI) translated into English. The translation may not be exact and may contain errors.

Tento článek si můžete zobrazit v originální české verzi. You can view this article in the original Czech version.
Řádkové příkazy Windows

Windows commands for command line

Edited 05.11.2012 18:45 | created | Petr Bouška - Samuraj |
My plan was to write down various useful commands for Windows in one place, along with a very brief description and example of common usage. I got some basics together but wanted to expand and fix it, but months go by and nothing, so I'm posting it in a not-so-finished state. Here you will find commands for use within the domain, but also for local matters. These are mostly commands used from the command line that are included with Windows. However, some are from Support Tools or Windows Resource Kits. I welcome your comments and additions in the comments.
displayed: 562 455x (562 102 CZ, 353 EN) | Comments [98]

Go to category:

Network

ping - tests the connection to a remote PC, measures the response time (latency)

  • ping 192.168.10.5 - target PC by IP
  • ping -t komp1 - target PC by DNS name (translation is performed) and doesn't stop after 4 packets

ipconfig - network adapter configuration (displays TCP/IP values)

  • ipconfig /all - detailed output
  • ipconfig /renew - renews the IP address of the interface
  • ipconfig /registerdns - renews DHCP lease and re-registers the address with DNS
  • ipconfig /flushdns - clears the DNS cache
  • ipconfig /displaydns - displays the DNS cache

nslookup - finds DNS records, simply IP address to domain name

  • has its own prompt after running
  • nslookup www.seznam.cz - returns the A record from the primary DNS for the given domain
  • ls -d {domain} - lists all records (if authorized) = Zone Transfer

arp - works with the ARP table (mapping IP addresses to MAC addresses)

  • arp -a - displays the ARP table
  • arp -d 157.55.85.212 - deletes the entry
  • arp -s 157.55.85.212 00-aa-00-62-c6-09 - adds the entry

netstat - active TCP connections on a port

  • netstat -b - lists the applications that created the connection
  • netstat -r - displays the routing table
  • netstat -ano | findstr 3044 – search

netdiag - client connection information, a diagnostic tool that tests the computer's network connection, verifies authorization, etc.

netsh - network shell - network configuration

  • has its own prompt after running
  • command-line commands (shell) for configuring everything related to networks
  • for example, netsh interface ip IP address configuration

tracert - traceroute function, tracks the path to the target (through which nodes/hops)

  • tracert www.google.com - pings individual hops

net - a wide range of commands related to networks, sharing, accounts, services

  • net use Administrator password - changes the local user Administrator's password to "password"
  • net use - displays mapped shares
  • net use u: \\ok\d - maps the network path to a drive
  • net user user - displays information about a local account
  • net user user /expire:1.10.2011 - sets the expiration date for a local account
  • net user user /domain - displays information about the domain account (e.g., last password change, login, logon script, global groups, etc.)
  • net help user - help for the net user command
  • net localgroup - lists existing local groups
  • net localgroup /domain - lists existing groups in the domain

route - information about the routing table

  • route print - displays the routing table

telnet - client for the Telnet service, suitable for testing the operation of an application on a specific port

  • telnet www.google.com 80 - connects to the specified address and port

ftp - simple FTP client

tftp - simple TFTP client

pathping - combination of ping and traceroute functions, quickly checks the path to the target and lists hops, performs statistics for each hop using ping

  • pathping -q 10 www.google.com - query the target by DNS, 10 queries for each hop (shortens execution time)

nbtstat - works with NetBIOS, mainly for troubleshooting

  • nbtstat -n - locally registered names
  • nbtstat -c - displays the contents of the NetBIOS cache
  • nbtstat -RR - refreshes the record on the WINS server

Network Commands

ping - tests connectivity to a remote PC, measures response time (latency)

  • ping 192.168.10.5 - target PC by IP
  • ping -t komp1 - target PC by DNS name (translation will be performed) and does not stop after 4 packets

ipconfig - configures network adapters (displays TCP/IP values)

  • ipconfig /all - detailed output
  • ipconfg /renew - renews the IP address of the interface
  • ipconfig /registerdns - renews DHCP lease and re-registers the address with DNS
  • ipconfig /flushdns - clears the DNS cache
  • ipconfig /displaydns - displays the DNS cache

nslookup - finds DNS records, simplifies to IP address for domain names

  • after starting, it has its own prompt
  • nslookup www.seznam.cz - returns A record from the primary DNS for the given domain
  • ls -d {domain} - lists all records (if permissions allow) = Zone Transfer

arp - works with ARP table (mapping IP addresses to MAC addresses)

  • arp -a - displays the ARP table
  • arp -d 157.55.85.212 - deletes a record
  • arp -s 157.55.85.212 00-aa-00-62-c6-09 - adds a record

netstat - active TCP connections on ports

  • netstat -b - lists applications that created the connections
  • netstat -r - displays the routing table
  • netstat -ano | findstr 3044 – search

netdiag - information about client connections, diagnostic tool that tests computer network connections, verifies authorization, etc.

netsh - network shell - network configuration

  • after starting, it has its own prompt
  • command-line tool (shell) for configuring everything related to networks
  • e.g., netsh interface ip for configuring IP addresses

tracert - traceroute function, tracks the path to the target (through which nodes/hops)

  • tracert www.google.com - pings individual hops

net - wide range of commands related to networks, sharing, accounts, services

  • net use Administrator password - changes the password of the local Administrator user to the given password
  • net use - displays mapped shares
  • net use u: \\ok\d - maps a network path to a drive
  • net user user - displays information about the local account
  • net user user /expire:1.10.2011 - sets the expiration date for a local account
  • net user user /domain - displays information about the domain account (e.g., last password change, login, logon script, global groups, etc.)
  • net help user - help for the net user command
  • net localgroup - lists existing local groups
  • net localgroup /domain - lists existing domain groups

route - information about the routing table

  • route print - displays the routing table

telnet - client for the telnet service, suitable for testing the running of an application on a certain port

  • telnet www.google.com 80 - connects to the specified address and port

ftp - simple FTP client

tftp - simple TFTP client

pathping - combines ping and traceroute functions, quickly traverses the path to the target and lists hops, performs statistics for each hop using ping

  • pathping -q 10 www.google.com - queries the target by DNS, 10 queries for each hop (shortens execution time)

nbtstat - works with NetBIOS, mainly for troubleshooting

  • nbtstat -n - locally registered names
  • nbtstat -c - displays the NetBIOS cache contents
  • nbtstat -RR - refreshes the WINS server record

Remote Calls

winrm - Windows Remote Management - remote command execution, WS-Management protocol

  • winrm quickconfig - configuration on the server

winrs - remote command execution on a server where WinRM is running

  • winrs -r:COMPUTER ipconfig - executes the ipconfig command on the COMPUTER server and returns the result

Processes and Services

sc - service control

  • sc delete name - deletes a service
  • sc create name - adds a service
  • sc start name - starts a service

net - the net command can also be used to control services

  • net start name - starts a service
  • net stop name - stops a service

tasklist - displays running system processes, similar to Task Manager, can be used on a remote computer, shows relationships between processes

  • tasklist /svc - shows services in each process
  • tasklist /fi "PID eq 2500" - searches for a process with a specific ID

runas - starts an application with different privileges

  • runas /user:ok\peter cmd.exe - runs cmd as the user peter

at - scheduled remote execution, schedules a specific command/task on a remote computer

shutdown - shuts down or restarts the computer

  • shutdown -r -f -t 1 - restarts the PC in 1 second with forced application termination

reg - command-line tool for working with the registry (like regedit), search, insert, delete...

tskill - terminates a process by PID or name, even on a remote PC

taskkill - a more powerful command to terminate a process, can use filters, and terminate multiple processes at once

Domain and Group Policy

gpresult - Group Policy Result Tool

  • information about applied policies and security groups to which the computer and logged-in user belong

gpupdate - updates group policies, normally only changes, can also be used on a remote PC

  • gpupdate /force - reapplies all policies

dsadd - adds an object to AD

  • dsadd ou ou=test,dc=company,dc=local - creates the test organizational unit in company.local

dsquery - queries information in AD

  • dsquery server - lists DC servers
  • dsquery server -hasfsmo schema - shows who holds the Schema Master role
  • dsquery server -hasfsmo name - shows who holds the Domain Naming Master role
  • dsquery server -hasfsmo infr - shows who holds the Infrastructure Master role
  • dsquery server -hasfsmo pdc - shows who holds the PDC Emulator role
  • dsquery server -hasfsmo rid - shows who holds the RID Master role
  • dsquery user -SAMID %USERNAME% - searches for a user by SAM account name (uses the currently logged-in user) and returns their DN (distinguished name)

dsget - retrieves information from AD

  • dsquery user -SAMID %USERNAME% | dsget user -SID - returns the SID of the currently logged-in user from AD

dsacls - manages ACL (permissions) on AD DS objects, part of Support Tools

  • dsacls CN=Guest,CN=Users,DC=company,DC=local - displays ACL on the Guest user

ntdsutil - database maintenance of the Active Directory store, manages FSMO, performs authoritative restore

browstat - displays information about the domain, PDC, and browser, the command is from the Windows Resource Kit

  • browstat sta - displays statistics for transports

certutil - command-line control of the certification authority, part of Certificate Services

  • certutil -dcinfo - displays information about domain controller certificates

netdom - joins a computer to a domain, renames, establishes trust, the command is from Remote Server Administration Tools, Support Tools

  • netdom renamecomputer old /newname:new /userd:domain\admin /passwordd:* /reboot:60 - changes the computer name (locally and in the domain), restarts after 60 minutes
  • netdom query /d:domain FSMO - lists servers that hold FSMO roles
  • netdom verify computer - verifies connection to the DC and displays its name

redircmp - changes the default container where a computer account is placed after joining a domain

  • redircmp ou=computers,dc=company,dc=local - sets the default container

auditpol - manages auditing policies, displays, and sets parameters

  • Auditpol /list /subcategory:* - lists available subcategories
  • Auditpol /get /category:* - displays current settings

Disk and File System

chkdsk - disk check, checks the FAT table and disk surface

  • chkdsk /f - performs repairs

chkntfs - disables automatic disk check on startup, can also perform an unscheduled check

  • chkntfs /d - restores settings

diskpart - disk management, partition management, text-based interface for creating/deleting and modifying VOLUME, PARTITION with RAID support

  • after launching, it has its own prompt
  • expand can expand partition size

fsutil - file system management

  • fsutil dirty query c: - check the status of NTFS

dir - displays directory contents

attrib - displays and sets file attributes

copy - copies files

xcopy - copies files including subdirectories with many options

robocopy - copies/synchronizes directories, including subdirectories and permissions, an enhanced version of xcopy, with backup options, part of the system since Windows Vista

md - creates a directory

rd - removes a directory

bootcfg - configures BOOT.INI

del - deletes a file

cacls - configures ACL on files, can be used to display directories along with assigned permissions (including AD groups)

  • cacls d:\*.* > decko.txt - lists the contents of drive D (root only) along with permissions for each folder and file, output is saved to a file

icacls - replacement for the cacls command

  • icacls d:\* /save decko.txt /T - lists the contents of drive D (recursively) along with permissions for each folder and file, output is saved to a file

find - searches for a string inside files

subst - assigns a drive letter to a directory

type - displays the contents of a file in text format

takeown - takes ownership of a folder/file (admin rights required), enabling access where it was previously restricted, can also be used remotely

  • takeown /F d:\folder /R /A - sets ownership for the administrators group on the folder d:\folder and all subfolders and files

mklink - creates a link to a file or folder, supports file symbolic link, directory symbolic link, directory junction, hard link

  • mklink /D link source - creates a symlink named "link" for the folder at "source"
  • mklink /J elsewhere c:\somewhere - creates a directory junction in the current folder, generally works better than a symlink

Information

systeminfo - overview of basic system info, including installed hotfixes

ver - displays the operating system version

now - displays the current date and time

whoami - displays the name of the logged-in user (and optionally more information)

  • whoami /all - provides more detailed information, including group memberships

set - configures environment variables

  • set - lists set variables, important system values are included (e.g., the name of the workstation, the DC it authenticated to)
  • set test=15 - sets a variable

winsat - Windows System Assessment Tool - measures various parameters and properties of the computer

  • winsat disk - measures disk speed (performance)
  • winsat mem - measures memory speed
  • winsat features - displays computer parameters

cmdkey - manages stored usernames and passwords (credentials) in the system, found in User Accounts - Manage your credentials

  • cmdkey /list - displays all stored credentials

wevtutil - retrieves information from event logs (Event log)

  • wevtutil el - lists all logs
  • wevtutil qe Application /c:3 /rd:true /f:text - returns the last 3 events from the Application log in text format

Others

w32tm - time synchronization

  • w32tm /config /manualpeerlist:131.107.1.10 /syncfromflags:MANUAL - synchronizes the DC with an external source
  • w32tm /config /update - updates the configuration
  • w32tm /resync - triggers synchronization

certreq - requests a certificate from a CA

logman - creates and manages Event Trace Session and Performance logs for Performance Monitor

Switches - redirection operators

First, a simplified (and not entirely accurate) description of some general switches that can be used with other commands (we will explain later how it actually works).

| more - paginates output (waits for a key press before continuing output after filling a page), added after a command using | (pipe symbol)

  • dir c:\windows | more

| findstr - searches the output for the specified string and displays only those lines, added after a command using | (pipe symbol)

  • dir c:\windows | findstr system

| sort - sorts and displays the passed lines, added after a command using | (pipe symbol)

  • dir c:\windows | sort /+13

In reality, these are not general switches but rather the use of one redirection operator, in this case, | pipe, combined with regular commands (programs) like more and findstr. With these operators, we can redirect the input and output of commands.

> (greater-than sign) - redirects the output of a command to a file or device (like a printer), by default it outputs to the command prompt window

  • dir c:\windows > c:\output.txt - saves the directory contents to a file on disk

>> (double greater-than sign) - similar to the > command, but appends to the specified file

  • type file2.txt >> file1.txt - merges file1.txt and file2.txt

< (less-than sign) - redirects command input from a file, by default it reads from the keyboard

  • create a file called cmd.txt and enter the commands select disk 0 and list partition on separate lines
  • diskpart < cmd.txt - displays the list of partitions on disk 0

| (pipe symbol) - redirects the output of the first command as input to the second command

  • dir c:\windows | find "system" - from the directory listing, displays only lines containing the string "system"

& (ampersand) - combines two commands, executes the first and then the second

  • dir c:\ & dir d:

Scripts and Batch Files (cmd, bat)

for - conditionally executes a command multiple times (works with files and directories as well), many usage options

if - conditional statement in a batch file

  • if exist test.txt (del test.txt) else (echo Not found) - if the file test.txt exists, it deletes it, otherwise it prints a message

goto - jumps to a label inside a batch file

  • goto End - jumps to the label "End"
    :End - label for the jump

echo - prints the specified text

  • echo test - prints the word "test"
  • echo %windir% - prints the content of a variable

cls - clears the screen (command prompt window)

exit - exits the script or command prompt window

start - runs a command in a separate command prompt window (and does not wait for the command to finish)

  • start dir c:

pause - waits for a key press

sleep - waits for a specified number of seconds, the command is from the Windows Resource Kit

Author:

Related articles:

Windows OS

Articles dedicated to Microsoft operating systems, both client and server.

If you want write something about this article use comments.

Comments
  1. [1] Miloš

    Tak tohle je velice dobrý seznam. Díky

    Tuesday, 22.12.2009 15:02 | answer
  2. [2] Lobo

    pekne, moc pekne. dik!

    Friday, 25.12.2009 21:33 | answer
  3. [3] tom

    pro Linuxaka, kterej se ve windows pohybuje jen svatecne

    velice uzitecna zalezitost, moc dik za krasnej tahak ;-)

    Tuesday, 29.12.2009 22:14 | answer
  4. [4] vita

    super!!!:-)

    Friday, 08.01.2010 19:02 | answer
  5. [5] lazna

    Pridal bych "pathping". Kombinace pingu a traceroutu, dobre na hledani problemu v rozlehlejsich sitich (obdoba "mtr" v linuxu). Ovsem pouzivat s parametrem "-q 10" (default je 100) coz zkrati cekani na vystup z 250 na prijatelnych 25 sec.

    Tuesday, 12.01.2010 16:43 | answer
  6. [6] gerw

    Super souhrn, a nešlo by doplnit jakým přepínačem se listuje po stránkách, např u vypisu příkazu dir. Nemohu si vzpomenout.

    Wednesday, 13.01.2010 07:52 | answer
  7. [7] Samuraj

    [7] Jde o dir | more. Doplním to do textu.

    respond to [6]gerw: Děkuji, tento příkaz jsem neznal.

    Wednesday, 13.01.2010 10:05 | answer
  8. [8] Fence

    Neznáte někdo příkaz, kterej by vypsal u připojeného síťového disku i uživatele, pod kterym je disk přihlášen? Příkaz "net use x:" vypíše jen cestu, nikoliv uživatele.Dík,

    Tuesday, 19.01.2010 11:25 | answer
  9. [9] mnbbnm

    respond to [7]Samuraj: Konkretne u dir navic existuje prepinac /p. V DOSu jsem driv nejak automaticky volal dir /w/p/o:gn

    Tuesday, 02.02.2010 18:32 | answer
  10. [10] Ondra

    Zdravím, neví někdo jak v registrech vypnout na klávesnici ty 3 klávesy na sleep, vypnutí a ta třetí nevím na co je. Dík. Ondra

    Thursday, 04.02.2010 23:44 | answer
  11. [11] Vláďa

    Zdravím, jakým příkazem zjistím, který DC (Domain Controler)mě ověřil? Děkuji

    Friday, 12.02.2010 13:41 | answer
  12. [12] Samuraj

    [12] Myslím, že se ten údaj ukládá do systémové proměnné, takže ji stačí vypsat:

    echo %logonserver%

    Nebo pomocí set vypsat všechny.

    Friday, 12.02.2010 13:50 | answer
  13. [13] mirekmx

    prosím, nezná někdo příkaz na ukončení aplikace na její spuštění z dosovského řádku pro winXP?

    Wednesday, 10.03.2010 08:46 | answer
  14. [14] rybnix

    spustíš tak, že prostě zavoláš spouštěcí soubor (C:aplikacespousteci_soubor.exe) ... a vypnutí... napadá mě pouze násilně přes taskkill ... (zobraz si nápovědu, tuším, že přepínač /IM název programu a /F je vynucené vypnutí)

    Friday, 26.03.2010 11:39 | answer
  15. [15] Rybisak

    k pingu bych mozna dodal jeste jeden velice uzitecny prepinac a to -l (velikost paketu) tim totiz muzete zjistit ze vam treba maly paket prochazi bez problemu ale velky paket umira na TTL nebo treba (hlavne u Wifi) na kolisani sitoveho provozu

    tusim ze u WinXP byl limit 4096 u vyssi ch jsem jeste limit netestoval :D ... jinak z jineho soudku ping 127.000.000.001 -t -l 4096 to uz neco pripomina :D

    Monday, 19.04.2010 15:44 | answer
  16. [16] Rybisak

    jo a jeste k pingu prepinac -a kdyz zadate ping 127.0.0.1 -a tak vam to vrati ze byl ping na localhost (tj provede i preklad z IP na domain name resp wins)

    Monday, 19.04.2010 15:51 | answer
  17. [17] Karel

    Upozornuji na vyse uvedeny prikaz "netsh" - je mimoradne uzitecny a co do moznosti velice kosaty; vyda na samostatny clanek.

    Monday, 24.05.2010 12:48 | answer
  18. [18] Vigo

    Tohle je super seznam i celé stránky moc mi pomohly

    Díky

    Monday, 02.08.2010 19:57 | answer
  19. [19] Jakub

    Zajimavy je prikaz whoami ... obdoba prikazu z linuxu

    Friday, 07.01.2011 10:17 | answer
  20. [20] Kom

    Až budeš mít trochu času, uveď pár ukázek a příkladů. Příklady táhnou. Nebudu chválit - chválí se samo - počtem návštěv.

    Sunday, 09.01.2011 00:39 | answer
  21. [21] Mirek

    :-), fakt dost dobrý

    Thursday, 21.04.2011 13:53 | answer
  22. [22] Jara

    Výborný seznam, nemůžu mít vše v hlavě.:-)

    Sunday, 15.05.2011 14:03 | answer
  23. [23] james

    a finger máš kde

    Tuesday, 30.08.2011 11:00 | answer
  24. [24] mirek

    dá se nějak změnit IP adresa z DHCP, nemyslím tím nastavit jí natvrdo ale smazat automaticky přiřazenou, tak aby si PC načetlo novou

    Wednesday, 07.09.2011 13:04 | answer
  25. [25] samuraj

    [25] ipconfig /release

    Tím se zbavím IP adresy, bohužel když požádám o novou

    ipconfig /renew

    tak ve většině případech dostanu stejnou jako předtím. Záleží to na DHCP serveru, ten standardně dává po určitou dobu jednomu klientovi tu samou IP adresu.

    Friday, 09.09.2011 08:06 | answer
  26. [26] Rosta

    jakým příkazem by šlo ve skriptu zjisti velikost určitého adresáře? Potřebuji zjistit velikost adresáře a pokud jeho velikost přesáhne určitou hodnotu, tak tento adresář smazat..:)

    Thursday, 20.10.2011 09:31 | answer
  27. [27] Samuraj

    [27] Já bych na to použil PowerShell, s tím se pak dá hodně pracovat. Nebo stáhnout utilitku DU (Disk Usage) od Sysinternals.

    Jenom malé navedení k PowerShellu:

    Get-ChildItem C:\Slozka | Measure-Object -Property Length -Sum

    Thursday, 20.10.2011 10:25 | answer
  28. [28] davidek

    jak mam pouzit prikaz attrib

    Monday, 24.10.2011 21:39 | answer
  29. [29] Vašek

    Prosím Vás nevíte jak zjistím Ip adresu volaného(skype) tak abych zjistil jeho statickou ip..? Je to pro mně velice důležité díky

    Tuesday, 25.10.2011 18:29 | answer
  30. [30] píčus

    do haje

    Saturday, 12.11.2011 18:32 | answer
  31. [31] Tazz

    Ahoj, mezi přepínače snad ještě "sort".

    Saturday, 10.12.2011 01:18 | answer
  32. [32] CZThomasCZ

    Díky! Hodně mi to pomohlo :-)

    hlavně příkaz "find" ;-)

    Saturday, 21.01.2012 21:21 | answer
  33. [33] mlcka

    Zdravím, mam dotaz, potreboval bych zjistit pomoci prikazu v Prikazove radce na kterem portu se nachazi nainstalovana tiskarna v systemu win XP Prof a to nasmerovat do souboru na disku.Dekuji nejak jsem na to meprisel. DV.T.

    Monday, 06.02.2012 20:46 | answer
  34. [34] mlcka

    [34] mlcka - jeste dodatek, jde o to, ze mam tiskarnu na USB portu ne LPT ani COM

    Monday, 06.02.2012 20:47 | answer
  35. [35] jarcel

    diky nasel jsem co jsem hledal;)

    Wednesday, 15.02.2012 00:29 | answer
  36. [36] PK

    Super, díky moc!!!

    Sunday, 11.03.2012 09:19 | answer
  37. [37] Pepa

    restart služby se musí provádět parametrem?

    pro instalování je parametr /i existuje něco podobého i pro restart služby? Pokud mohly by jste uvést příklad? Děkuji

    Monday, 12.03.2012 14:21 | answer
  38. [38] Samuraj

    [38] Nevím o jakém příkazu mluvíte. Restart služby můžeme provést třeba:

    net stop spooler

    net start spooler

    Nebo:

    sc stop spooler

    sc start spooler

    Nebo také pomocí PowerShellu:

    Restart-Service spooler

    Tuesday, 13.03.2012 08:28 | answer
  39. [39] Fifa

    ;-)

    Dík za seznam... Spokojenost:-)

    Thursday, 12.04.2012 13:46 | answer
  40. [40] Tom Liberec

    Seznam je paráda. Teď ještě jak s příkazu xcopy vytvoři ikonu tak ab se nemuselo nic spouětět s příkazová řádky.

    Thursday, 21.06.2012 00:39 | answer
  41. [41] David

    Ahoj,

    mě by zase zajímalo, co přesně musím napsat do souboru např. on.bat, který by měl za úkol spustit tři aplikace skype, Trillian a Office communicator a nastavit jim určitý stav např. online.

    Podobně bych chtěl vytvořit i soubor off.bat, který by aplikace vypnul, či hodil do stavu OFFline.

    Zkoušel jsem vložit např. "C:\Program Files\Skype\Phone\Skype.exe /shutdown" ale to nezafunguje vždy asi snad jen jednou...

    Díky!

    D.

    Thursday, 16.08.2012 13:05 | answer
  42. [42] Olda Gremlica

    Díky moc za tento seznam :-)

    Tuesday, 18.09.2012 14:19 | answer
  43. [43] paulo

    prosím potřeboval bych přes příkazový řádek změnit časování mezi výberem operačních systémů.jde to?nebo zpustit druhý operační systém.

    Tuesday, 25.09.2012 21:26 | answer
  44. [44] David

    Skvělé, jen opravte (cíly = cíli) :). A nějaká rada ohledně TELNET na WIN7 ? Cmd ten prikaz vubec nezna:/

    Thursday, 11.10.2012 14:59 | answer
  45. [45] Samuraj

    [45] Díky :-). Telnet pro Windows 7 není problém, je to vlastnost (Feature) systému, ale defaultně není instalovaná. Stačí jít do Programy a funkce (Programs and Features) a zapnout Telnet client.

    Thursday, 11.10.2012 19:42 | answer
  46. [46] Phoe

    Super seznam, díky. Možná k tracertu bych doplnil přepínač -d, který vypne překlad doménových jmen. Tracing je pak mnohem rychlejší, když se nehledá DNS záznam, který na LANu třeba ani nemáme - ukazuje jenom IP adresy.

    Friday, 26.10.2012 09:09 | answer
  47. [47] BostonG

    Super článek jako všechno tady;-). Mám dotaz, jednou jsem se setkal s nějaký příkazem, kterým si nastavit na PC něco jako prioritu/%příjem rychlosti připojení(po zadání jakmile pustím můj PC tak ostatním klesne rychlost připojení a můj PC využívá třeba 80% rychlosti připojení) sorry za kostrbatost, už si nepamatuju jak to přesně fungovalo.Díky moc

    Tuesday, 13.11.2012 10:52 | answer
  48. [48] Samuraj

    [48] Nejsem si jistý, jestli dotaz chápu. Každopádně si myslím, že ve Windows nativně žádné prostředky pro rate limiting (omezování rychlosti síťového provozu) nejsou. Tedy, abych byl přesný, tak pomocí Group Policy se dá nastavovat Policy-based QoS. Ale to jsem ani netestoval, ani jsem neslyšel, že by se to nějak více využívalo.

    Wednesday, 14.11.2012 13:54 | answer
  49. [49] Gorog

    Jeste bych mozna doplnil:

    query user \\servername nebo IP

    Pak

    logoff sessionid \\servername nebo IP

    Pokud nejste ve domene/workgroupe tak tohle nepomuze, ale da se to obejit psexec a pustit to rovnou na cilovem serveru :-))

    Lide se zapominaji odlogovavat bohuzel.

    Wednesday, 28.11.2012 15:32 | answer
  50. [50] Gorog

    Dalsi co me napada:

    hostname

    Pozor na prikaz shutdown, ktery dokaze byt velice zradny, protoze napr. ve starsich systemech jsou ty prepinace trosku jinak udelane a muze se stat ze misto restartu vypnete server/PC. Pokud je ve vedlejsi mistnosti tak no problem ale pokud ve vzdalenem datacentru bez RSA nebo avocentu nebo neceho podobneho tak holt tam bude muset nekdo dojit a zapnout ho rucne:-) Jinak prikaz shutdown jsem zacal hojne pouzivat ve Windows 8 protoze tam proste nikde neni dostupne vypnuti.

    Wednesday, 28.11.2012 15:36 | answer
  51. [51] kati

    je to veeeeeelice dobra latka, a pomahla mě moc. Děkujiiii:-):-):-):-):-):-)

    Thursday, 10.01.2013 07:42 | answer
  52. [52] Jirka

    [52]

    Taky jsem to ve Windows 8 nejprve řešil baťákem se shutdown na ploše, nicméně pokud najedeš do pravého rohu obrazovky, vyjede ti lišta s tlačítky -> Nastavení -> Vypnout.. :D

    Nelogický, ale je to tam. :)

    Thursday, 10.01.2013 15:50 | answer
  53. [53] Libi's

    Cs

    potřeboval bych pomoct. Pokouším se udělat "blbůstku" do *.bat a potřeboval bych časovat. Aby se něco spustilo třeba za 30 sec. Jde to? Díky za radu ;-)

    Saturday, 19.01.2013 11:17 | answer
  54. [54] svamdy123

    ahoj mam problem sere mne uca na kompi pls muzes mi poslad jak se ji dostat do pocitace a trochu ji pozlibit napis mi na e-mail jjaakub@atlas.cz diky za odpoved

    Monday, 04.02.2013 09:34 | answer
  55. [55] Pába

    Milejší mně je to z klávesnice, ale namísto v doméně oblíbeného CTRL+ALT+DEL teď přichází Win+D, následuje ALT+F4 a dialog pro vypnutí/restart se zobrazí. A to i případě, kdy k Win8 přistupuji přes RDP, což byl pro mne hlavní kámen úrazu (přes RDP totiž nelze vypnout/restartovat Win8 tak jako když jsem zalogován z konsole).

    Friday, 08.02.2013 14:34 | answer
  56. [56] Pába

    [57] předchozí příspěvek měla být odpověď na respond to [52]Jirka: a respond to [54]svamdy123: jenže jsem měl vypnutý Javascript a tak se to nepovedlo... sorry

    Friday, 08.02.2013 14:37 | answer
  57. [57] Pába

    respond to [55]Pába: příkaz sleep, anebo to řešit naplánovanou úlohou (z příkazového řádku pomocí AT nebo Schtasks (nápověda viz parametr /?)

    Friday, 08.02.2013 14:41 | answer
  58. [58] pomoc

    Prosím vás mohl by mi někdo napsat více o funkci sleep:-(

    Thursday, 07.03.2013 14:55 | answer
  59. [59] Lazna

    respond to [33]mlcka: Find uz nepouzivat, je deprecated. Findstr umi rychleji vse co find ba i mnohem vic. Hlasuju pro ho ze seznamu uplne vyhodit.

    Saturday, 09.03.2013 00:03 | answer
  60. [60] Libis

    Jsem asi trochu natvrdlí. Nevím jak to použít. Můžu poprosit o napsání příkazu abych to pochopil? Třeba zapnout chroma a za 20s ho zase vypnout?

    Saturday, 06.04.2013 11:16 | answer
  61. [61] Pába

    [62] Protože sám Chrome nepoužívám, tak uvedu příklad pro notepad (spustí a za 20 s jej sestřelí):

    notepad.exe & SLEEP 20 & pskill notepad

    výše uvedený příklad využívá nainstalované PSTools od SysInternals (koupené před pár lety Microsoftem a jsou volně stažitelné). PSKill je však možno nahradit příkazem TaskKill obsaženém ve Win7 a W8 (taskkill /F /IM notepad.exe)

    Monday, 13.05.2013 15:38 | answer
  62. [62] cmd

    Hoják chci se zeptat jestli by se dalo přes CMD nabourat do něakého pc nebo sítě :-) ;-) Jak ta hledám tak nic nenacházím . Možná by to šlo přes backtrack 4 né? ale určitě by to chtělo něake programky na to né? Prosím odpověd

    Monday, 03.06.2013 18:58 | answer
  63. [63] MichalF

    Pre ludi pracujucich v domene je velmi sikovne aj ....

    net user uzivatel /domain

    rovnako by som doplnil whoami /all lebo samotne whoami nie je az take zaujmave :)

    Thursday, 18.07.2013 13:40 | answer
  64. [64] Samuraj

    [65] díky :-)

    Monday, 22.07.2013 09:53 | answer
  65. [65] velepetr

    Dobrý den,

    chtěl bych se zeptat jak udělám aby zkopíroval složku a vygeneroval její nové jméno třeba číslo.

    Monday, 29.07.2013 19:05 | answer
  66. [66] Jirka

    [67]a co třeba vytvořit adresář s názvem podle požadavků a nakopírovat do něj obsah z původního adresáře?

    Thursday, 05.09.2013 08:04 | answer
  67. [67] velepetr

    jo ale abych vytvořil třeba 10 000 složek a nemusel to vypisovat

    Saturday, 07.09.2013 19:19 | answer
  68. [68] velepetr

    a skrý ty složky

    Saturday, 07.09.2013 19:26 | answer
  69. [69] Pába

    [69] Jestli jde o to vytvořit 10000 složek s názvem např. Adresar1.. až Adresar9999 tak bych šel cestou dávkového souboru s využitím cyklu FOR /F, který by čerpal názvy z textového souboru (např. nazvy_adr.txt) Ten bych si naplnil třeba tak, že bych si názvy vygeneroval třeba v Excelu (pomocí funkce vyplnit řady) a pak přes schránku přenesl takto získané názvy do zmíněného texťáku.

    Ale určitě by to šlo i mnohem elegatněji, možnosti příkazu FOR jsou velmi široké a zvládnutí alespoň jejich malé části je podmínkou úspěšného řešení podobného úkolu...:-) Skrytí těch složek je už pak jen dalším řádkem dávky v cyklu pomocí příkazu ATTRIB

    Monday, 09.09.2013 18:44 | answer
  70. [70] David Malý

    Zdravím,

    Problém. Potřebuji restartovat službu na serveru, který běží v doméně z jakéhokoliv PC v doméně. Windows Server 2008. Je to Webová služba. Potřebuji na to napsat Skript, který v noci kdykoliv spustí kdokoliv a jakkoliv z toho PC v doméně. Nejlépe pomocí kliknutí na ikonu.

    Děkuji Moc

    Wednesday, 18.09.2013 15:07 | answer
  71. [71] Samuraj

    [72] To je jednoduché, použije se příkaz sc nebo PowerShell nebo řada dalších. Ale musí to být spuštěno pod uživatelem s dostatečnými právy, pokud je nemá ten, kdo to bude volat, tak to může být součástí skriptu, ale pak to heslo každý uvidí ...

    Wednesday, 18.09.2013 15:40 | answer
  72. [72] Paba

    [73]

    Nebo lze na serveru pravidelně spouštět naplánovanou úlohou script každých x minut (x je 1 až 5 dle potřeby rychlosti reakce) který kontroluje výskyt značkovacího souboru v adresáři kde mají uživatelé právo zapisovat. V případě výskytu souboru dávka (pod účtem admina) tu službu restartuje, smaže soubor a je hotovo. Není třeba dávat uživatelům žádná zvláštní práva, kromě zápisu na vytvoření značkovacího souboru. A ten může vytvořit dávka spouštěná dvojlikem na ikonu zástupce na ploše. Distribuce dávky a vytvoření zástupce lze pomocí Group policy preferences.

    Saturday, 21.09.2013 11:44 | answer
  73. [73] gfwoskwhvw

    djmkhtbnvsbk.d{, <a href="http://www.sxzplxviem.com/">hvpcigapbk</a> , [url=http://www.nkehkfgqfv.com/]dddtdradio[/url], http://www.yhnuhhstdd.com/ hvpcigapbk

    Tuesday, 04.02.2014 23:57 | answer
  74. [74] zetrozet

    Potřebuji dávkovým souborem z ASCII souboru na jiném lokálním disku vymazat všechny řádky začínající středníkem, a nemohu se prokousat příkazem FOR. Poradí někdo?

    Friday, 07.02.2014 22:07 | answer
  75. [75] Paba

    Na co For? Pokud tam nejsou stedniky jinde nez na zacatku, tak bych to prohnal pres Find nebo Findstr a vystup presmeroval do souboru.

    Mrkni na Find /?

    neco na zpusob:

    Find /I /N ";" soubor_se_strednikem > soubor_bez_stredniku

    BTW. Stredniky na zacatku vetsinou oznacuji komentare davek, cemu to vadi?

    Wednesday, 12.02.2014 17:47 | answer
  76. [76] zetrozet

    Jde mi o automatizovanou tvorbu *.MD5, aby skript nemusel následně kontrolovat/vynechávat zbytečnosti, když soubor i *.MD5 připravuji lokálně a pak umisťuji na web.

    Friday, 14.02.2014 12:09 | answer
  77. [77] Peter

    Zdravim super zoznam ale vedel by si mi pomoct so scriptom ktory si potom vytvorim na ploche a vypise nazov pocitaca na win7??

    Friday, 28.03.2014 10:04 | answer
  78. [78] Sheckley

    ;-)Dobrá práce :-)

    Saturday, 29.03.2014 07:01 | answer
  79. [79] Honza

    Kdo ví, jak vystavím kurzor na konkrétní místo v CMD okně (nejlépe do pozice 0;0)

    Něco jako CLS, ale aby mi to nesmazalo obsah CMD okna

    Thursday, 03.04.2014 11:40 | answer
  80. [80] Plague

    cau, jak se prosim pres cmd ve win7 prida novy uzivatel (*ucet na PC*)? Drive jsem to vedel, ale uz si to nepamatuju. Dik ;-)

    Monday, 07.07.2014 09:58 | answer
  81. [81] Samuraj

    [82] Vygoogli si detaily o net user /add :-)

    Monday, 07.07.2014 10:17 | answer
  82. [82] Jirka

    respond to [79]Honza: echo %computername%

    nebo set computername

    Thursday, 10.07.2014 13:15 | answer
  83. [83] Miki

    Chybí manipulace s registrem v batch, např:

    reg query HKLM\Software\Microsoft\...

    if %errorlevel%==1 (goto RUN) else (goto END)

    REG ADD "HKLM\Software\Microsoft\...

    Hledám, jak smazat registr a najíti nemůžu:-)

    Friday, 26.09.2014 15:46 | answer
  84. [84] Miki

    [85]Už jsem našel...

    REG DELETE... Ostatně stačí v komandlajně zadat REG /? a víte příkazy,

    potom REG DELETE /? a víte vše.

    Jenom to nesmíte dělat v blbých Win 8!!!!

    Friday, 26.09.2014 16:17 | answer
  85. [85] Ron

    zdravím, mám celkem problém s nastavením IP v cmd. Po zadání příkazu "netsh interface ipv4 add address "Local Area Connection" address=192.168.1.15 255.255.255.0 192.168.1.1" vypíše: "The RPC server is unavailable."

    Prosím o pomoc.

    Děkuji

    PS: Win 7 Enterprise 32-bit, Firewall disabled, Služby pro RPC běží.

    Příkazy pro změnu a přidání DNS fungují.

    Friday, 26.06.2015 16:01 | answer
  86. [86] Micha;

    Zdravim, poradi mi nekdo, jak jednoduse vyresit tento problem?

    WinServer 2003, zalohovani pomoci CobianBackup, kdy cilem jsou sdilene adresare, ke kterym se prihlasuji uzivatele a spousteji si tam umistene soubory (vetsinou DOC nebo XLS) a pokud si vecer nevypnou PC a maji ten soubor otevreny, tak se pomoci Cobianu nezazalohuje, protoze ho ma onen uzivatel otevreny. Chtel bych tedy nejak jednoduse veskere soubory otevrene pres sdileni pred provadenim te zalohy nasilne odpojit. Hledal jsem, ale vhodny prikaz nenasel. Predem dekuji za nakopnuti :-)

    Wednesday, 09.09.2015 11:47 | answer
  87. [87] Ben

    zdravím

    Je možné prostřednictvím cmd najít v souboru určitý text a nahradit ho jiným textem?

    Wednesday, 18.11.2015 13:55 | answer
  88. [88] Pavel

    Zdravím,

    je nějaký příkaz na vyhledání harddisků v počítači a na vyhledání změn hardwaru v počítači? Děkuji za odepsání.

    S pozdravem

    Pavel

    Friday, 12.08.2016 03:07 | answer
  89. [89] ROlda

    respond to [79]Honza:

    echo %computername%

    Friday, 07.10.2016 22:18 | answer
  90. [90] zetrozet

    Prosím, abyste pro ostatní okomentoval řádek sám, dávkový soubor s jeho použitím pošlu mailem jako *.bat.TXT:

    FOR /R "%cd%" %%I in (..) do if "%cd%" == "%%~dpI" SET cdd = %%~fsI else continue

    Thursday, 22.06.2017 10:28 | answer
  91. [91] cerv

    zdravim,

    jde prez příkazoví řádek zjistit vypis vsech hesel co byli v PC pouzita ?

    pripadne jak

    dekuji

    Sunday, 09.12.2018 11:50 | answer
  92. [92] Petr

    Ahoj. Potřebuju ve Windows 7 nastavit výchozí americkou ASCII tabulku. Neví někdo, jakým příkazem to udělat?

    Sunday, 01.09.2019 11:26 | answer
  93. [93] mattes

    Ahoj, prosím máte radu jak pomocí cmd refreshnout připojení přes HDMI? všechno mám zapojené, ale po uspání PC se velmi často stane, že se mi externí monitor nechce připojit.. Tak by se mi líbilo vzbudit ho příkazem do CMD

    Co vy na to? :)

    Saturday, 10.04.2021 07:45 | answer
  94. [94] ...

    respond to [7]Samuraj: je to kdyz chces o slozku nahoru tak napis cd.. a kdyz chces jit do nejake slozky pod tak napis cd [napr.] windows a to te dostane do te slozky kam chces

    Sunday, 06.06.2021 19:48 | answer
  95. [95] Ferdinand

    Dá se nějak v souboru *.BAT emulovat tlačítko Enter (tj. funkci "OK", čili schválení)?

    Thursday, 08.09.2022 12:17 | answer
  96. [96] Sten

    zkouším načíst data ze souboru do proměnné ale nedaří se mi to.

    předpokládal jsem že bych použil FINDSTR ale do proměnné se mi uloží jen příkaz a ne obsah

    set VERZE=FINDSTR VERSION= Version.id

    echo VERZE:%VERZE%

    výsledek je "FINDSTR VERSION= Version.id"

    nevíte jak to zadat aby se do proměnné načel obsah?

    Thursday, 27.07.2023 07:31 | answer
  97. [97] Sten

    [99] vyřešeno příkazem FOR

    for /f "tokens=*" %%i in ('FINDSTR "VERSION=" a.txt') do set VERZE=%%i

    Thursday, 27.07.2023 11:10 | answer
  98. [98] Michal

    Dobrý den,

    existuje příkaz, který by vyhledal jakýkoli soubor,

    když zadáte část názvu souboru.

    A bylo by super kdyby to zároveň vypsalo i umístění.

    Takový příkaz find co funguje obráceně.

    Saturday, 12.08.2023 15:47 | answer
Add comment

Insert tag: strong em link

Help:
  • maximum length of comment is 2000 characters
  • HTML tags are not allowed (they will be removed), you can use only the special tags listed above the input field
  • new line (ENTER) ends paragraph and start new one
  • when you respond to a comment, put the original comment number in squar brackets at the beginning of the paragraph (line)