dos cheat sheet - PDF - PDF

Document Sample
dos cheat sheet - PDF - PDF Powered By Docstoc
					Batch File Commands                                      cls
                                                         Clears the screen of all text and display the prompt.
                                                                                                                 Default Networking components
                                                                                                                 Client for Microsoft Networks: Allows access to
                                                                                                                 network resources.
echo. creates a new line
echo off turns of returning the text for commands        echo This will display some text.       File and Print Sharing: Allows access to network file
echo on turns on returning text for commands             cls                                     and print resources
echo [text] displays the [text] provided                 rem The above text will be cleared from
                                                         the screen and only a prompt will be
                                                         displayed.                              QoS Packet Scheduler: Provides guaranteed
echo This text will be displayed.                                                                delivery system for network traffic.
rem                                                      Ceases operation of the batch file until the user       TCP/IP: Allows computer to communicate over
Remark used to place comments                            presses a key.                                          networks. TCP/IP; default networking protocol.

Example:                                              set                                             File System Comparison
Rem This part is now a comment and will Changes the value of a variable to another variable NTFS
not be executed                                       or specified string.                                 •    File-level and Folder-level security
                                                                                                           •    Disk compression
labels (:)                                            for                                                  •    Disk Quota
Allows you to assign locations to various sections of Used for batch files to run a specified command
the batch file. Used in conjunction with GOTO to skip when a parameter is met or specified.
                                                                                                           •    File encryption
certain sections or return to certain sections.
                                                                                                      FAT or FAT32
goto                                                  for %%P in (%dirname%\*.txt) do call                 •    Dual Boot Configuration Support
Proceed to the specified section. Used with LABEL to dispbak.bat %dirname% %%P                             •    No file-level security
effectively skip and return to sections.
                                                                                                      Joining a domain requires:
Example:                                              Batch File Command Syntax                            •    A Domain Name
echo This is the start section.
                                                      echo                                                 •    A computer account
goto Start                                            echo [ON | OFF]                                      •    An available domain controller and a DNS
                                                      echo [Message]                                            server
Used to assess whether a given condition is true or   rem                                             Joining a Workgroup Requires
not (see below).                                      Rem [Comment]
                                                                                                           •    A New or Existing Workgroup Name

if errorlevel                                             labels (:), goto
Determines if the returned errorlevel is within a certain :[Label Name]                                          User Accounts
level, then executes a given command.                     goto [Label Name]                                      Enable or Disable the Guest Account
                                                                                                                     1. Start > Control Panel > User Accounts
Example:                                                 if errorlevel                                               2. In User Accounts Window, Click User
if errorlevel 5 goto end                                 if errorlevel [Error Level Number] [Command]                     Accounts
                                                                                                                     3. Click 'Guest' Icon
choice                                                   choice                                                      4. Click Turn On the Guest Account OR Turn
Allows a batch file to wait for a user to select an      [/C[:]choices] [/N] [Text to display]                            Off the Guest Account
option from a set of choices. /C: specifies the
allowable keys, /N makes it so available choices         if exist                                                Local User Accounts
aren't displayed at the end of the prompt string.        if exist [Filename.Extension] [Command]                     •    Provide access to local resources
                                                                                                                     •    Created on computers that are not in a
Example:                                                 if not exist
choice /C:12345 /N Please Choose 1, 2,                   if not exist [Filename.Extension] [Command]
3,4, or 5.                                                                                                           •    Created in local security database
if exist                                                 input [Variable name to assign] [Text prompting user Domain User Accounts
Determines if a file or directory exists. If it does,    for input]                                              •    Provide access to network resources
execute the given command.                                                                                       •    Provide access token for authentication
                                                         justname                                                •    Created in Active Directory services on
Example:                                                 justname [Variable Name of Extracted Filename]               domain controller running Windows 2000
if exist %filename%.%xname% echo                         [File name]
%filename%.%xname% FOUND!                                                                                             Server / Windows Server 2003.
                                                         for                                                     Built-In User Accounts
if not exist                                             for [Variable] in (set) do [Command] [Command
Determines if a file or directory doesn't exist. If it                                                           Administrator: Manage the overall computer. Create
                                                         Parameters]                                             and modify user accounts, groups, manage security
doesn't, execute the given command.
                                                                                                                 policies, create printer resources, and assign the
Example:                                                 Installing Windows XP Pro                               permissions and rights that allow user accounts to
if not exist %filename%.%xname%                   echo                                                           access resources.
                                                         Minimum Requirements
%filename%.%xname% NOT FOUND!                            233 MHz processor or equivalent
                                                                                                                 Guest: Allows occasional users to log on and access
                                                         64MB RAM Minimum
input                                                                                                            resources. This account is disabled by default to
                                                         1.5GB Hard Drive Space
Used to prompt the user for input and assign the                                                                 protect the computer from unauthorized use.
value of that input to a variable.                       Computer's name can only be up to 15
                                                                                                                 Initial User: Named on the registered user and is
                                                         characters; can be changed later.
Example:                                                                                                         created during Windows Activation only if the
input xname "Give me the extension of                                                                            computer is a member of a workgroup.
the file you are looking for: "                          Can join a workgroup during install, can join a
                                                         domain later.
                                                                                                                 HelpAssistant: Not available for standard logon. This
justname                                                                                                         account is used to authenticate users who connect
Used to remove the extension from a file, and assign Can join a domain during install, can join a                using remote assistance.
the name of the file to a variable.                  workgroup later.
                                                                                                                 SUPPORT_xxxxxxxx: (Where xxxxxxxx is a number
Example:                                                                                                         generated during setup). Used by Microsoft when
justname filename %fullname%
providing remote assistance through the Help and        Users: Perform only tasks which they have              permissions on a file or folder, regardless of the
Support Service account.                                specifically given rights; access only those resources permissions set to protect the file or folder.
Naming Conventions for Users                            that they've been given permission.
     •     Must be unique                                                                                      Ownership: Current owner or any user with Full
                                                                                                               Control permission can assign the Full Control
     •     Maximum of 20 characters                     NTFS                                                   standard permission or the Take Ownership special
     •     Not case sensitive                           Standard NTFS Folder Permissions                       permission. Administrator can take ownership of a file
     •     Avoid invalid characters (symbols)           Read: See files and sub-folders in the folder, view    or folder regardless of the assigned permissions.
     •     Accommodate people with the same name        folder permissions and attributes.
     •     Identify type of employee                                                                           Effect on NTFS File and Folder Permissions when
                                                        Write: Create new files and sub-folders within the     Files and Folders are Copied
     •     Should rename built-in Administrator and
                                                        folder, change folder attributes, view folder                •    Copy on same NTFS volume: Inherit from
           Guest accounts.                              ownership and permissions.                                        destination folder
Password Conventions                                                                                                 •    Copy to another NTFS volume: Inherit from
                                                        List Folder Contents: See names of files and
      •     Minimum length of 8 characters              folders in the folder.
                                                                                                                          destination folder
            recommended                                                                                              •    Copy from an NTFS volume to a FAT
      •     Can contain up to 128 characters            Read and execute: Move through folders to reach                   volume: Permissions lost.
      •     Should use a combination of upper and       other files and folders, even if the users do not have
            lower-case letters, numbers, and symbols permission for those folders, and perform actions         Effect on NTFS File and Folder Permissions when
                                                        permitted by the Read permission and List Folder       Files and Folders are Moved
You can modify an existing user account by using Contents permission.                                                •    Move on same NTFS volume: Maintain
the user accounts tool.                                                                                                   original permissions.
                                                        Modify: Delete the folder plus perform actions               •    Move to another NTFS volume: Inherit from
User Profile: Established when a user logs on           permitted by the Write permission and the Read and                destination folder
Profile is a collection of folders and data that stores Execute permission.                                          •    Move from an NTFS volume to a FAT
the user's current desktop environment, application                                                                       volume: Permissions lost.
settings, network connections and personal data         Full Control: Change permissions, take ownership,
                                                        and delete sub-folders and files, plus perform actions
Group: Collection of individual user accounts.          permitted by all other NTFS folder permissions.        Notes
Groups make it easier to assign permissions. It is
better to assign permissions to a group rather than     NTFS File Permissions                                   ______________________
individual users: it's easier to manage, and you don't Read: Read the file and view attributes, ownership
have to continually set up individual users'            and permissions.                                        ______________________
permissions, rather you just have to make them part
of a group. When a group is deleted, the permissions Write: Overwrite the file, change file attributes, view    ______________________
and rights associated with it are removed.              file ownership and permissions.
System Groups: Don't have specific memberships         Read and Execute: Run applications, plus perform
you can modify, they represent different users at      the actions permitted by the read permission.            ______________________
different times, depending on how a user accesses a
computer or resource.                                  Modify: Modify and delete the file, plus perform the ______________________
                                                       actions permitted by the write permission and the
Built-In System Groups                                 read and execute permission.                             ______________________
Everyone: All users on the computer.
                                                       Full Control: Change permissions and take
                                                       ownership, perform all actions permitted by all other
Authenticated Users: All users with valid user
accounts on the computer.                              NTFS file permissions.                                   ______________________
Creator Owner: The user account for the user who NTFS Stores an Access Control List (ACL) with ______________________
created or took ownership of a resource.               every file and folder on an NTFS volume. The
                                                       ACL contains Access Control Entries (ACE)
                                                       which contain information on each file/ folder and
Network: Any user with a current connection from
another computer on the network to a shared            its permissions.                                         ______________________
resource on the computer.
                                                       File Permissions Override Folder Permissions             ______________________
Interactive: The user account for the user who is
logged on at the computer.                             Deny Permissions Override Allow Permissions. ______________________
                                                       However, using deny should be an exception, not a
Anonymous Logon: Any user account that Windows rule.
XP Pro cannot authenticate.
Dialup: Any user who currently has a dial-up
                                                       Special Permissions (Shortened List)
                                                       Full Control: Applies all permissions to the user or
connection.                                            group.                                                   ______________________
Built-in Local Groups
Administrators: Perform all administrative tasks.
                                                       Traverse Folder/ Execute File: Applies only to
                                                       folders and allows a user to move (or denies them
Backup Operators: Can use Windows Backup to
                                                       from moving) through folders even when the user
                                                       has no permissions set on the traversed folder.
restore a computer.
                                                       Delete: Allows or denies deletion of a file or folder.
Guests: Perform only tasks which they have             A user can delete a file/ folder without having the
specifically given rights; access only those resources delete permission granted on that folder if the Delete
that they've been given permission; can't make
permanent changes to desktop.
                                                       Subfolder and Files permission has been granted to
                                                       the user on the parent folder.
Power Users: Create and modify local user accounts
and share resources.
 Replicator Supports: File replication in a domain. Take Ownership: Allows or denies taking ownership
                                                       of the file or folder. Owner of a file can always change

Shared By: