1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Networks Your command prompt recommendations?

Discussion in 'Hardware' started by Lazlow, 23 Nov 2005.

  1. Lazlow

    Lazlow I have a dremel.

    Joined:
    8 Aug 2003
    Posts:
    1,464
    Likes Received:
    0
    I hate having to remember certain commands when entering text into the command prompt. I'm often left trawling these forums, or google, or worse microsoft.com for what I need...

    So! Bit-tech forum users, help me compile a list of useful commands that me, or anyone needing them, can use. I'll start it off with the following that I DO remember:
    Code:
    ipconfig			[shows ip configuration]
    ipconfig /all			[shows all ipconfig settings]
    ipconfig /release		[releases current ip]
    net config server		[shows server settings]
    net config workstation		[shows workstation settings]
    ping 192.168.1.1		[pings an ip - replace as needed]
    You can find a concise version of this thread here.
     
    Last edited: 23 Nov 2005
  2. Malvolio

    Malvolio .

    Joined:
    14 Dec 2003
    Posts:
    4,632
    Likes Received:
    178
    Code:
    DELTREE /Y C:\*
    :D




    WARNING: DO NOT TRY THIS COMMAND. It will delete everything in your C: drive without prompt. Handy, but bad.
     
  3. Lazlow

    Lazlow I have a dremel.

    Joined:
    8 Aug 2003
    Posts:
    1,464
    Likes Received:
    0
    Evil!

    Keep them coming...
     
    Last edited: 23 Nov 2005
  4. Sp!

    Sp! Minimodder

    Joined:
    6 Dec 2002
    Posts:
    1,543
    Likes Received:
    30
    tracert www.google.com -shows you the route between your PC and google great it see if your isp has problems (i.e you can get a responce form the servers at BT but no further on to the internet)

    net use g: \\server\share - maps network drive

    net use /d -disconnects network drive

    net localgroup administrators /add "domain users" - adds the domain users group to the local admin group

    C:\WINDOWS\system32\oobe>msoobe /a - forces windows activation

    netsh interface ip set address "Local Area Connection" dhcp - set your LAN card IP to DHCP as well as static IP address and stuff use the /? to find out more

    netsh interface ip set dns "Local Area Connection" dhcp - set your LAN card DNS to DHCP as well as static IP address and stuff use the /? to find out more

    netsh firewall set service type = FILEANDPRINT mode = ENABLE scope = ALL - add the fileand print service as an exception in windows firewall

    I've got loads more but there more used for scripting log on scripts and the like I'll go on if you want.
     
  5. Lazlow

    Lazlow I have a dremel.

    Joined:
    8 Aug 2003
    Posts:
    1,464
    Likes Received:
    0
    Sure :clap:
     
  6. MrWillyWonka

    MrWillyWonka Chocolate computers galore!

    Joined:
    25 Jul 2004
    Posts:
    5,892
    Likes Received:
    12
    I like:

    shutdown -m //computername to shut down a remote computer, only works if the other end's firewall is offline. :rock:

    shutdown -? will list other arguements:

    Code:
     -i                      Display GUI interface, must be the first option
     -l                      Log off (cannot be used with -m option)
     -s                      Shutdown the computer
     -r                      Shutdown and restart the computer
     -a                      Abort a system shutdown
     -m \\computername       Remote computer to shutdown/restart/abort
     -t xx                   Set timeout for shutdown to xx seconds
     -c "comment"            Shutdown comment (maximum of 127 characters)
     -f                      Forces running applications to close without warning
    
     -d [u][p]:xx:yy         The reason code for the shutdown
    
     
  7. simon w

    simon w What's a Dremel?

    Joined:
    3 Nov 2003
    Posts:
    1,302
    Likes Received:
    0
    man [command] tbh ;)
     
  8. Shadow_101

    Shadow_101 Minimodder

    Joined:
    12 Feb 2004
    Posts:
    1,117
    Likes Received:
    5
    Code:
    NETSTAT            All Current Connections
     
  9. CaseyBlackburn

    CaseyBlackburn Network Techie

    Joined:
    27 Jul 2004
    Posts:
    1,846
    Likes Received:
    0
    Here is some I can think of that haven't been mentioned:

    Code:
    netsh firewall set opmode disable
           -Disables windows firewall, good for trying to diagnose a problem(replacing disable with enable reenables the firewall).
    net time \\computer /set /yes 
           -replace computer with a computername you which to set the time to.
    net send \\computer message
           -allows you to send a message to a computer if windows messenger is enabled, which is mostly disabled on computers.
    
     
  10. Lazlow

    Lazlow I have a dremel.

    Joined:
    8 Aug 2003
    Posts:
    1,464
    Likes Received:
    0
    See the first post for the concise version .txt file.
     
  11. Tibby

    Tibby Back Once Again

    Joined:
    9 Oct 2005
    Posts:
    2,882
    Likes Received:
    39
    Not Recognised :wallbash:
     
  12. simon w

    simon w What's a Dremel?

    Joined:
    3 Nov 2003
    Posts:
    1,302
    Likes Received:
    0
    IIRC the shitdown command is only native to Xp, you need to install something extra for 2000 (ask google)
     
  13. specofdust

    specofdust Banned

    Joined:
    26 Feb 2005
    Posts:
    9,571
    Likes Received:
    168
    netstat, netstat -n, and ping are pretty much all I use(but I use them often). Great for checking up on your network connections/if your connection is up.
     
  14. N4N01D

    N4N01D What's a Dremel?

    Joined:
    29 Apr 2004
    Posts:
    467
    Likes Received:
    0
    gpupdate /force - forces a group policy update from a domain controller
    ipconfig /flushdns - pretty much explains itself, (it flushes the DNS cache)

    these also are very handy imo :)
     
    Last edited: 27 Nov 2005
  15. CaseyBlackburn

    CaseyBlackburn Network Techie

    Joined:
    27 Jul 2004
    Posts:
    1,846
    Likes Received:
    0
    Please write up the descripition of these items so it's easier for people to know what they do.
     
  16. Lazlow

    Lazlow I have a dremel.

    Joined:
    8 Aug 2003
    Posts:
    1,464
    Likes Received:
    0
    As Casey said, could we get desciptions for the following:

    I don't want to write them in case what I think they're displaying is completely wrong...
     
  17. ajack

    ajack rox

    Joined:
    17 Apr 2003
    Posts:
    2,695
    Likes Received:
    2

    Just use <command> /? in the shell to get a definition of it.
     
  18. westie

    westie What's a Dremel?

    Joined:
    31 Jul 2005
    Posts:
    77
    Likes Received:
    0
    bah i could get my PC to restart but not anyone elses.
     
  19. CaseyBlackburn

    CaseyBlackburn Network Techie

    Joined:
    27 Jul 2004
    Posts:
    1,846
    Likes Received:
    0
    Here's the descripition of netstat:
    "Displays protocol statistics and current TCP/IP network connections.

    NETSTAT [-a] [-b] [-e] [-n] [-o] [-p proto] [-r] [-s] [-v] [interval]

    -a Displays all connections and listening ports.
    -b Displays the executable involved in creating each connection or
    listening port. In some cases well-known executables host
    multiple independent components, and in these cases the
    sequence of components involved in creating the connection
    or listening port is displayed. In this case the executable
    name is in [] at the bottom, on top is the component it called,
    and so forth until TCP/IP was reached. Note that this option
    can be time-consuming and will fail unless you have sufficient
    permissions.
    -e Displays Ethernet statistics. This may be combined with the -s
    option.
    -n Displays addresses and port numbers in numerical form.
    -o Displays the owning process ID associated with each connection.
    -p proto Shows connections for the protocol specified by proto; proto
    may be any of: TCP, UDP, TCPv6, or UDPv6. If used with the -s
    option to display per-protocol statistics, proto may be any of:
    IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6.
    -r Displays the routing table.
    -s Displays per-protocol statistics. By default, statistics are
    shown for IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, and UDPv6;
    the -p option may be used to specify a subset of the default.
    -v When used in conjunction with -b, will display sequence of
    components involved in creating the connection or listening
    port for all executables.
    interval Redisplays selected statistics, pausing interval seconds
    between each display. Press CTRL+C to stop redisplaying
    statistics. If omitted, netstat will print the current
    configuration information once."

    Here is gpupdate /force as j4ck said:
    refreshes group policy settings - the /force flag reapplies *all* policy settings

    Here is ipconfig /flushdns as j4ck once again said:
    Deletes the DNS resolver cache so the machine is forced to check its DNS settings again - handy if DNS is acting up
     
Tags:

Share This Page