Batch Script - NET



Provides various network services, depending on the command used.

Syntax

NET [variant]

Where its variants can be one of the following −

  • net accounts
  • net computer
  • net config
  • net continue
  • net file
  • net group
  • net help
  • net helpmsg
  • net localgroup
  • net name
  • net pause
  • net print
  • net send
  • net session
  • net share
  • net start
  • net statistics
  • net stop
  • net time
  • net use
  • net user
  • net view

Example

@echo off 
Net user

Output

The above command will display the current accounts defined on the system. Following is an example of an output.

User accounts for \\WIN-50GP30FGO75

-------------------------------------------------------------------------------
Administrator            atlbitbucket            Guest
The command completed successfully.
batch_script_commands.htm
Advertisements