Dos - Net Command (Network)

About

Net is an external command used to:

  • update, fix, or view the network or network settings.
  • manage open files
  • synchronize time
  • manage resources
  • manage account and group
  • manage session

Syntax

The syntax of this command is:

NET
    [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
      HELPMSG | LOCALGROUP | PAUSE | SESSION | SHARE | START |
      STATISTICS | STOP | TIME | USE | USER | VIEW ]

To get the general help:

net help

To get the help on a command:

NET HELP command

Command

ACCOUNTS

NET ACCOUNTS updates the user accounts database and modifies password and logon requirements for all accounts. When used without options, NET ACCOUNTS displays the current settings for password, logon limitations, and domain information.

net accounts
Force user logoff how long after time expires?:       Never
Minimum password age (days):                          1
Maximum password age (days):                          45
Minimum password length:                              6
Length of password history maintained:                5
Lockout threshold:                                    5
Lockout duration (minutes):                           5
Lockout observation window (minutes):                 5
Computer role:                                        WORKSTATION
The command completed successfully.

COMPUTER

NET COMPUTER adds or deletes computers from a domain database. This command is available only on Windows NT Servers.

CONFIG

NET CONFIG displays configuration information of the Workstation or Server service. When used without the SERVER or WORKSTATION switch, it displays a list of configurable services.

net config
The following running services can be controlled:

   Server
   Workstation

The command completed successfully.

CONTINUE

NET CONTINUE reactivates a Windows service that has been suspended by NET PAUSE.

FILE

NET FILE closes a shared file and removes file locks. When used without options, it lists the open files on a server. The listing includes the identification number assigned to an open file, the pathname of the file, the username, and the number of locks on the file.

net file
There are no entries in the list.

as it's not on a server.

GROUP

NET GROUP adds, displays, or modifies global groups on servers. Used without parameters, it displays the groupnames on the server.

This command can be used only on a Windows Domain Controller.

LOCALGROUP

NET LOCALGROUP modifies local groups on computers. When used without options, it displays the local groups on the computer.

net localgroup
Aliases for \\HI-LAPTOP-NGD

------------------------------------------------
*Administrators
*Backup Operators
*Cryptographic Operators
*Distributed COM Users
*Event Log Readers
*Guests
*IIS_IUSRS
*IIS_WPG
*Netmon Users
*Network Configuration Operators
*ora_dba
*Performance Log Users
*Performance Monitor Users
*Power Users
*Remote Desktop Users
*Replicator
*Users
*WinRMRemoteWMIUsers__
The command completed successfully.

PAUSE

NET PAUSE suspends a Windows service or resource. Pausing a service puts it on hold.

Use the continue command to change the status

SESSION

NET SESSION lists or disconnects sessions between the computer and other computers on the network. When used without options, it displays information about all sessions with the computer of current focus.

SHARE

NET SHARE makes a server's resources available to network users. When used without options, it lists information about all resources being shared on the computer. For each resource, Windows reports the devicename(s) or pathname(s) and a descriptive comment associated with it.

net share
Share name   Resource                        Remark

-------------------------------------------------------------------------------
C$           C:\                             Default share
D$           D:\                             Default share
IPC$                                         Remote IPC
ADMIN$       C:\Windows                      Remote Admin
kiosque      D:\kiosque
temp_vm      D:\temp_vm
The command completed successfully.

START

NET START start service and lists running Windows service.

When typed at the command prompt, service names of two words or more must be enclosed in quotation marks. For example, NET START “NET LOGON” starts the net logon service.

net start
These Windows services are started:

   Adobe Acrobat Update Service
   Andrea ST Filters Service
   Application Experience
   Audio Service
   Background Intelligent Transfer Service
   Base Filtering Engine
   Bluetooth Service
   Bluetooth Support Service
   Certificate Propagation
   Cisco AnyConnect VPN Agent
   CNG Key Isolation
   COM+ Event System
   Computer Browser
   Credential Vault Host Control Service
   Credential Vault Host Storage
   Cryptographic Services
   DCOM Server Process Launcher
   Desktop Window Manager Session Manager
   DHCP Client
   Diagnostic Policy Service
   Diagnostic Service Host
   Distributed Link Tracking Client
   DNS Client
   Encrypting File System (EFS)
   Extensible Authentication Protocol
   F-Secure Anti-Virus Firewall Daemon
   F-Secure Management Agent
   F-Secure Network Request Broker
   F-Secure ORSP Client
   FSGKHS
   Group Policy Client
   IDriveE Service
   IKE and AuthIP IPsec Keying Modules
   Intel(R) Centrino(R) Wireless Bluetooth(R) + High Speed Security Service
   Intel(R) Management & Security Application User Notification Service
   Intel(R) Management and Security Application Local Management Service
   Intel(R) PROSet Monitoring Service
   Intel(R) PROSet/Wireless Event Log
   Intel(R) PROSet/Wireless Registry Service
   Intel(R) PROSet/Wireless Zero Configuration Service
   Intel(R) Rapid Storage Technology
   Intelr Centrinor Wireless Bluetoothr + High Speed Service
   IP Helper
   IPsec Policy Agent
   Juniper Network Connect Service
   Mobile Broadband Service
   Netlogon
   Network Connections
   Network List Service
   Network Location Awareness
   Network Store Interface Service
   Offline Files
   Plug and Play
   Portable Device Enumerator Service
   Power
   Print Spooler
   Program Compatibility Assistant Service
   Qualcomm Gobi 2000 Download Service (Dell)
   Remote Procedure Call (RPC)
   RPC Endpoint Mapper
   Security Accounts Manager
   Security Center
   Server
   Shell Hardware Detection
   Smart Card
   SSDP Discovery
   Superfetch
   System Event Notification Service
   Task Scheduler
   TCP/IP NetBIOS Helper
   Themes
   TomTomHOMEService
   UPnP Device Host
   User Profile Service
   WebClient
   Windows Audio
   Windows Audio Endpoint Builder
   Windows Defender
   Windows Driver Foundation - User-mode Driver Framework
   Windows Event Log
   Windows Firewall
   Windows Font Cache Service
   Windows Image Acquisition (WIA)
   Windows Management Instrumentation
   Windows Media Player Network Sharing Service
   Windows Search
   Windows Time
   Windows Update
   WinHTTP Web Proxy Auto-Discovery Service
   WLAN AutoConfig
   Workstation

The command completed successfully.

STATISTICS

NET STATISTICS displays the statistics log for the local Workstation or Server service.

  • the services for which statistics are available.
NET STATISTICS
Statistics are available for the following running services:

   Server
   Workstation

The command completed successfully.
  • Workstation Statistics
NET STATISTICS WORKSTATION
Workstation Statistics for \\HI-LAPTOP-NGD


Statistics since 2013-09-24 11:14:39


  Bytes received                               2821497
  Server Message Blocks (SMBs) received        7
  Bytes transmitted                            0
  Server Message Blocks (SMBs) transmitted     0
  Read operations                              529
  Write operations                             2
  Raw reads denied                             0
  Raw writes denied                            0

  Network errors                               0
  Connections made                             0
  Reconnections made                           48
  Server disconnects                           1

  Sessions started                             0
  Hung sessions                                0
  Failed sessions                              0
  Failed operations                            0
  Use count                                    78
  Failed use count                             52

The command completed successfully.
  • Server Statistics
NET STATISTICS SERVER
Server Statistics for \\HI-LAPTOP-NGD


Statistics since 2013-09-24 11:14:42


Sessions accepted                  1
Sessions timed-out                 0
Sessions errored-out               0

Kilobytes sent                     11
Kilobytes received                 0

Mean response time (msec)          0

System errors                      0
Permission violations              0
Password violations                0

Files accessed                     17
Communication devices accessed     0
Print jobs spooled                 0

Times buffers exhausted

  Big buffers                      0
  Request buffers                  0

The command completed successfully.

STOP

Stopping a service cancels any network connections the service is using. Also, some services are dependent on others. Stopping one service can stop others.

TIME

NET TIME synchronizes the computer's clock with that of another computer or domain, or displays the time for a computer or domain. When used without options on a Windows Server domain, it displays the current

USE

NET USE connects a computer to a shared resource or disconnects a computer from a shared resource. When used without options, it lists the computer's connections.

net use
New connections will be remembered.


Status       Local     Remote                    Network

-------------------------------------------------------------------------------
OK           I:        \\nas-01\Install          Microsoft Windows Network
OK           P:        \\nas-01\Projecten        Microsoft Windows Network
OK           W:        \\nas-01\Allen            Microsoft Windows Network
Disconnected           \\HI-LAPTOP-NGD\c$        Microsoft Windows Network
The command completed successfully.
  • Use
net use \\%COMPUTERNAME%\c$
Local name
Remote name       \\HI-LAPTOP-NGD\c$
Resource type     Disk
Status            Disconnected
# Opens           0
# Connections     1
The command completed successfully.

USER

NET USER creates and modifies user accounts on computers. When used without switches, it lists the user accounts for the computer.

The user account information is stored in the user accounts database.

VIEW

NET VIEW displays a list of resources being shared on a computer. When used without options, it displays a list of computers in the current domain or network.

net view
Server Name            Remark

-----------------------------------------------
\\H--PC-RGF
\\HI-LAPOTP-090
\\HI-LAPTOP-AHR
\\HI-LAPTOP-BBN
\\HI-LAPTOP-JSN1
\\HI-LAPTOP-MSS
\\HI-LAPTOP-NGD
\\HI-LAPTOP-THR
\\HI-PC-001
\\HI-PC-086
\\HI-PC001
\\HI-PC022-PC
\\HILT-005
\\HIPC-003
\\HIPC-004
\\HIPC-006
\\HIPC-007
\\HIPC-009
\\WS-001               WS-001
\\WS-002
The command completed successfully.

Powered by ComboStrap