net stats srv //uptime from network stats systeminfo //command line all stuff (including boot time)
systeminfo.exe //uptime, OS, originall install, ram, domain, logonserver, nic's systeminfo.exe /s computername /u domain\username /p password
ipconfig /all (note that window98 had a gui, winipcfg from the Run prompt) ipconfig /renew ipconfig /flushdns
ping tracert pathping netstat
net view \10.0.0.13 net use x: \10.0.0.13
net use /delete x: net use /delete \10.0.0.13\share
net use * \fileservername\share
net user username newpassword /domain
net use x: /user:username /persistent:yes|no
net localgroup /add administrators "domain users"
promts for new password
net user username * /domain
Note: If you type these commands on a member server or workstation and
you don't add the /domain switch, the command will be performed on the
local SAM and NOT on the DC SAM.
Note: Non-administrators receive a "System error 5 has occurred. Access is denied"
error message when they attempt to change the password.
nbtstat -a 127.0.0.1 nbtstat [-a RemoteName] [-A IPAddress] [-c] [-n] [-r] [-R] [-RR] [-s] [-S] [Interval] -a RemoteName : Displays the NetBIOS name table of a remote computer, where RemoteName is the NetBIOS computer name of the remote computer. The NetBIOS name table is the list of NetBIOS names that corresponds to NetBIOS applications running on that computer.
-A IPAddress : Displays the NetBIOS name table of a remote computer, specified by the IP address (in dotted decimal notation) of the remote computer.
-c : Displays the contents of the NetBIOS name cache, the table of NetBIOS names and their resolved IP addresses.
-n : Displays the NetBIOS name table of the local computer. The status of Registered indicates that the name is registered either by broadcast or with a WINS server.
-r : Displays NetBIOS name resolution statistics. On a Windows XP computer that is configured to use WINS, this parameter returns the number of names that have been resolved and registered using broadcast and WINS.
-R : Purges the contents of the NetBIOS name cache and then reloads the #PRE-tagged entries from the Lmhosts file.
-RR : Releases and then refreshes NetBIOS names for the local computer that is registered with WINS servers.
-s : Displays NetBIOS client and server sessions, attempting to convert the destination IP address to a name.
-S : Displays NetBIOS client and server sessions, listing the remote computers by destination IP address only.
Interval : Redisplays selected statistics, pausing the number of seconds specified in Interval between each display. Press CTRL+C to stop redisplaying statistics. If this parameter is omitted, nbtstat prints the current configuration information only once.
Windows Logon Id's
2 interactive 3 network 4 batch 5 service 7 unlock 8 network cleartext 9 RunAs 10 RemoteInteractive 11 CachedInteractive
Monitor Logon Script
Create your logon script and place it in the %SystemRoot%\System32 folder. Run Regedt32.exe and go to the following value: HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion \Winlogon\Appsetup 2. After the last entry in the Appsetup value, place a comma and a space and then enter the name and extension of the logon script you placed in the %SystemRoot%\System32 folder. For example, if the value of Appsetup is: Usrlogon.cmd, Rmvlinks.exe After adding an entry for Termlogon.cmd, the value would look like: Usrlogon.cmd, Rmvlinks.exe, Termlogon.cmd
echo %computername% %username% %date% %time% >> %homedrive%\%homepath%\log\log.txt
CMD-network-share
net share sharename=drive:path REM net share test="c:\Documents and Settings\Administrator.LDAPTEST\Desktop\test"
net share test="o:\Finance" /GRANT:Marketing,READ
cacls /G
NET SHARE sharename sharename=drive:path [/GRANT:user,[READ | CHANGE | FULL]] [/USERS:number | /UNLIMITED] [/REMARK:"text"] [/CACHE:Manual | Documents| Programs | None ] sharename [/USERS:number | /UNLIMITED] [/REMARK:"text"] [/CACHE:Manual | Documents | Programs | None] {sharename | devicename | drive:path} /DELETE
Displays or modifies access control lists (ACLs) of files
CACLS filename [/T] [/M] [/S[:SDDL]] [/E] [/C] [/G user:perm] [/R user [...]]
[/P user:perm [...]] [/D user [...]]
filename Displays ACLs.
/T Changes ACLs of specified files in the current directory and all subdirectories.
/M Changes ACLs of volumes mounted to a directory /S Displays the SDDL string for the DACL.
/S:SDDL Replaces the ACLs with those specified in the SDDL string (not valid with /E, /G, /R, /P, or /D).
/E Edit ACL instead of replacing it. /C Continue on access denied errors. /G user:perm Grant specified user access rights. Perm can be: R Read W Write C Change (write) F Full control
/R user Revoke specified user's access rights (only valid with /E).
/P user:perm Replace specified user's access rights.
Perm can be: N None
R Read
W Write
C Change (write)
F Full control
/D user Deny specified user access.
Wildcards can be used to specify more that one file in a command.
You can specify more than one user in a command.
Abbreviations:
CI - Container Inherit. The ACE will be inherited by directories.
OI - Object Inherit. The ACE will be inherited by files.
IO - Inherit Only. The ACE does not apply to the current file/directory.