dos cheat sheet - PDF

Document Sample
dos cheat sheet - PDF Powered By Docstoc
					Batch File Commands
echo echo. creates a new line echo off turns of returning the text for commands echo on turns on returning text for commands echo [text] displays the [text] provided Example: echo This text will be displayed. rem Remark used to place comments

cls Clears the screen of all text and display the prompt.

Default Networking components Client for Microsoft Networks: Allows access to network resources.

Example: echo This will display some text. File and Print Sharing: Allows access to network file cls and print resources rem The above text will be cleared from the screen and only a prompt will be QoS Packet Scheduler: Provides guaranteed displayed. delivery system for network traffic. pause Ceases operation of the batch file until the user presses a key. TCP/IP: Allows computer to communicate over networks. TCP/IP; default networking protocol.

File System Comparison set Example: Rem This part is now a comment and will Changes the value of a variable to another variable NTFS • File-level and Folder-level security not be executed or specified string. • Disk compression labels (:) for • Disk Quota Allows you to assign locations to various sections of Used for batch files to run a specified command • File encryption the batch file. Used in conjunction with GOTO to skip when a parameter is met or specified. certain sections or return to certain sections. FAT or FAT32 Example: • Dual Boot Configuration Support goto for %%P in (%dirname%\*.txt) do call • No file-level security Proceed to the specified section. Used with LABEL to dispbak.bat %dirname% %%P effectively skip and return to sections. Joining a domain requires: Example: Batch File Command Syntax • A Domain Name :Start echo • A computer account echo This is the start section. echo [ON | OFF] • An available domain controller and a DNS goto Start echo [Message] server if rem Used to assess whether a given condition is true or Joining a Workgroup Requires Rem [Comment] not (see below). • A New or Existing Workgroup Name labels (:), goto if errorlevel Determines if the returned errorlevel is within a certain :[Label Name] goto [Label Name] level, then executes a given command. Example: if errorlevel 5 goto end choice Allows a batch file to wait for a user to select an option from a set of choices. /C: specifies the allowable keys, /N makes it so available choices aren't displayed at the end of the prompt string. Example: choice /C:12345 /N Please Choose 1, 2, 3,4, or 5. if exist Determines if a file or directory exists. If it does, execute the given command. Example: if exist %filename%.%xname% echo %filename%.%xname% FOUND! if not exist Determines if a file or directory doesn't exist. If it doesn't, execute the given command. Example: if not exist %filename%.%xname% %filename%.%xname% NOT FOUND! echo if errorlevel if errorlevel [Error Level Number] [Command] choice [/C[:]choices] [/N] [Text to display] if exist if exist [Filename.Extension] [Command] if not exist if not exist [Filename.Extension] [Command]

User Accounts
Enable or Disable the Guest Account 1. Start > Control Panel > User Accounts 2. In User Accounts Window, Click User Accounts 3. Click 'Guest' Icon 4. Click Turn On the Guest Account OR Turn Off the Guest Account Local User Accounts • Provide access to local resources • Created on computers that are not in a domain • Created in local security database

input input [Variable name to assign] [Text prompting user Domain User Accounts • Provide access to network resources for input] • Provide access token for authentication justname • Created in Active Directory services on justname [Variable Name of Extracted Filename] domain controller running Windows 2000 [File name] Server / Windows Server 2003. for for [Variable] in (set) do [Command] [Command Parameters] Built-In User Accounts Administrator: Manage the overall computer. Create and modify user accounts, groups, manage security policies, create printer resources, and assign the permissions and rights that allow user accounts to access resources. Guest: Allows occasional users to log on and access resources. This account is disabled by default to protect the computer from unauthorized use. Initial User: Named on the registered user and is created during Windows Activation only if the computer is a member of a workgroup. HelpAssistant: Not available for standard logon. This account is used to authenticate users who connect using remote assistance. SUPPORT_xxxxxxxx: (Where xxxxxxxx is a number generated during setup). Used by Microsoft when

Installing Windows XP Pro
Minimum Requirements 233 MHz processor or equivalent 64MB RAM Minimum 1.5GB Hard Drive Space Computer's name can only be up to 15 characters; can be changed later. Can join a workgroup during install, can join a domain later.

input Used to prompt the user for input and assign the value of that input to a variable. Example: input xname "Give me the extension of the file you are looking for: "

justname Used to remove the extension from a file, and assign Can join a domain during install, can join a workgroup later. the name of the file to a variable. Example: justname filename %fullname%

providing remote assistance through the Help and Support Service account. Naming Conventions for Users • Must be unique • Maximum of 20 characters • Not case sensitive • Avoid invalid characters (symbols) • Accommodate people with the same name • Identify type of employee • Should rename built-in Administrator and Guest accounts.

Users: Perform only tasks which they have permissions on a file or folder, regardless of the specifically given rights; access only those resources permissions set to protect the file or folder. that they've been given permission. Ownership: Current owner or any user with Full Control permission can assign the Full Control NTFS standard permission or the Take Ownership special Standard NTFS Folder Permissions permission. Administrator can take ownership of a file Read: See files and sub-folders in the folder, view or folder regardless of the assigned permissions. folder permissions and attributes. Effect on NTFS File and Folder Permissions when Write: Create new files and sub-folders within the Files and Folders are Copied folder, change folder attributes, view folder • Copy on same NTFS volume: Inherit from ownership and permissions. destination folder • Copy to another NTFS volume: Inherit from Password Conventions List Folder Contents: See names of files and destination folder • Minimum length of 8 characters folders in the folder. • Copy from an NTFS volume to a FAT recommended volume: Permissions lost. • Can contain up to 128 characters Read and execute: Move through folders to reach other files and folders, even if the users do not have • Should use a combination of upper and Effect on NTFS File and Folder Permissions when lower-case letters, numbers, and symbols permission for those folders, and perform actions Files and Folders are Moved permitted by the Read permission and List Folder • Move on same NTFS volume: Maintain You can modify an existing user account by using Contents permission. original permissions. the user accounts tool. Modify: Delete the folder plus perform actions • Move to another NTFS volume: Inherit from permitted by the Write permission and the Read and User Profile: Established when a user logs on destination folder Execute permission. Profile is a collection of folders and data that stores • Move from an NTFS volume to a FAT the user's current desktop environment, application volume: Permissions lost. Full Control: Change permissions, take ownership, settings, network connections and personal data and delete sub-folders and files, plus perform actions Notes permitted by all other NTFS folder permissions. Group: Collection of individual user accounts. Groups make it easier to assign permissions. It is NTFS File Permissions better to assign permissions to a group rather than individual users: it's easier to manage, and you don't Read: Read the file and view attributes, ownership and permissions. have to continually set up individual users' 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 file ownership and permissions. and rights associated with it are removed.

______________________ ______________________ ______________________ ______________________ Read and Execute: Run applications, plus perform System Groups: Don't have specific memberships the actions permitted by the read permission. ______________________ you can modify, they represent different users at different times, depending on how a user accesses a Modify: Modify and delete the file, plus perform the ______________________ computer or resource. actions permitted by the write permission and the read and execute permission. ______________________ Built-In System Groups 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 NTFS file permissions. accounts on the computer. ______________________ Creator Owner: The user account for the user who NTFS Stores an Access Control List (ACL) with ______________________ every file and folder on an NTFS volume. The created or took ownership of a resource. ACL contains Access Control Entries (ACE) ______________________ which contain information on each file/ folder and Network: Any user with a current connection from its permissions. another computer on the network to a shared ______________________ resource on the computer. File Permissions Override Folder Permissions ______________________ Interactive: The user account for the user who is Deny Permissions Override Allow Permissions. ______________________ logged on at the computer. However, using deny should be an exception, not a Anonymous Logon: Any user account that Windows rule. ______________________ XP Pro cannot authenticate. Special Permissions (Shortened List) ______________________ Full Control: Applies all permissions to the user or Dialup: Any user who currently has a dial-up group. connection. ______________________ Traverse Folder/ Execute File: Applies only to Built-in Local Groups ______________________ folders and allows a user to move (or denies them Administrators: Perform all administrative tasks. from moving) through folders even when the user ______________________ has no permissions set on the traversed folder. Backup Operators: Can use Windows Backup to restore a computer. ______________________ Delete: Allows or denies deletion of a file or folder. A user can delete a file/ folder without having the Guests: Perform only tasks which they have ______________________ specifically given rights; access only those resources delete permission granted on that folder if the Delete Subfolder and Files permission has been granted to that they've been given permission; can't make ______________________ the user on the parent folder. permanent changes to desktop. ______________________ 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:
Tags: cheat, sheet