Microsoft Command Line Tools

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Remember to Run as Administrator

Ctrl+Shift+Enter

List files and directories

dir linux = ls

Manage disk configurations, storage devices, partitions Create/delete a partition, format a partition, reduce volume size, extend a volume, etc.

diskpart

More on dism

DISM can be used to mount and service a Windows image from a .wim file, .ffu file, .vhd file, or a .vhdx file and also to update a running operating system. Prepare, modify, and repair system images. Perform application updates/patches, driver upgrades. Allows the administrator to manage Windows Imaging Format (WIM) files. Used to make changes to Windows Imaging Format (WIM) files. The dism utility is used for managing and configuring Windows Imaging Format (WIM) files. Get info about images, update applications, manage drivers, manage updates, mount images. A system administrator has created a Windows image that will be deployed to all new workstations. However, a developer has just released a patch for an application that is part of the image. Which of these would be the best way to update this image with the latest software? Use DISM to upgrade the application: The DISM utility allows the system administrator to manage Windows image files. DISM can perform application updates, driver upgrades, and more. DISM can be used to service a Windows image (.wim) or a virtual hard disk (.vhd or .vhdx). DISM comes built into Windows and is available through the command line or from Windows PowerShell.

More on diskpart

DiskPart is a command line interpreter - a separate environment inside CMD. Type "exit" to leave the environment. Use "help" inside DiskPart. Provides command line access to disk and partition configuration settings. An administrator can manage disk configurations and partitions with the diskpart utility. The diskpart command is used to manage disk configurations, partitions, and volumes. The diskpart command is not used for drive letters and shares.

More on chkdsk

If the volume is locked (if the OS is in use), you can run chkdsk during startup - check disk can't run on a drive with the OS running on the drive. The volume can be scheduled to checked during the next startup. The chkdsk /r can fix logical file system errors and locate and recover data from bad physical sectors on a hard drive. A system administrator is concerned that the local Windows file system may contain logical file system errors. Scan and repair any potential file system errors from the Windows command line. The chkdsk command is used to identify and fix logical file system errors and bad physical sectors. The /f option will fix the logical file system and the /r option will locate bad sectors and attempt to recover any readable data. The scanning and repair process is often completed during a reboot. A system administrator is concerned that the NTFS file system on a Windows 10 system may be corrupted. Which of these would be the best way to test the file system for inconsistencies? The Check Disk utility, or CHKDSK, can be used to analyze and correct file system errors and locate bad hard drive sectors.

Shutdown commands in Linux

Linux also uses "shutdown", but with different modifiers

More on sfc

Scan for file integrity issues: a built-in administrative tool to verify the integrity of operating system files and to repair files that are corrupt, damaged or changed. Scan the integrity of all protected system files and replace any files that may be corrupted/damaged. Scan, detect, and replace corrupted or missing system files using the locally available recovery image (hidden recovery partition). Used to verify that the core operating system files are valid. A Windows utility that will verify the integrity of the core operating system files. Used to scan and replace any core operating system files that may be corrupted or missing. It's common to run sfc after removing malware or after a significant operating system issue, or if a Windows update didn't work properly. Scan protected system files to make sure that the core operating system has integrity. Scan the integrity of all protected system files and correct any files that may have been changed since their installation. Works on internal AND external drives.

More on gpudate

Used to force a Group Policy update to computers in a Windows Active Directory domain. Forces centralized updates to be activated on target devices.

Change working directory

cd You can also use backslash \ to specify a volume or name of a folder you want to move to

Identify and fix LOGICAL FILE SYSTEM errors AND bad PHYSICAL SECTORS.

chkdsk

chkdsk modifiers

chkdsk /f • Fixes LOGICAL FILE SYSTEM errors on the disk chkdsk /r (much more comprehensive--CHECKS THE PHYSICAL DISK, NOT JUST THE FILE SYSTEM) • Performs the chkdsk /f function, then locates any bad sectors and recovers readable information and writes it to a known good sector. Sector by sector check & fix. Implies the /f function to be included with /r

Copy a file or series of files from one location (directory) to another. On the same storage device or onto a different storage device.

copy

copy modifiers

copy /v - Verifies that new files are written correctly copy /y - Suppresses prompting to confirm you want to overwrite an existing destination file You have to indicate which file you want to copy, AND where you want to copy it TO: copy /v document.txt c:Documents If you want to copy the file AND avoid all the prompts, type /v AND /y together: copy /v /y document.txt c:Documents

Manage Windows imaging format files (WIM)

dism

Write a file system to a partition and initialize a disk, initialize a file system.

format Be sure to include the drive letter: format c: Used to initialize a file system. Running the format command removes all of the information on the partition. *See Full, Standard, Quick, Regular, and low-level formatting!

Verify policy settings for a computer or user

gpresult Allows the domain administrator to verify policy settings for a computer or user. Display the policy settings associated with a computer or user.

gpresult modifiers

gpresult /r (see policies on the local computer) gpresult /user sgc/professor /v (see policies for a user on a domain)

Force a group policy update

gpudate gpupdate /target:<computer|user> /force For example: gpupdate /target:professor /force

An advanced copy utility that can be used to transfer files between folders or systems.

robocopy If the file transfer gets interrupted, it can automatically resume the transfer when connectivity is restored. Good for use over WAN or other connections where connectivity is unreliable/intermittent. Shows transfer stats when the operation is completed.

Locate and repair damaged SYSTEM FILES (core/protected operating system files)

sfc

System File Checker modifiers

sfc /scannow Scan and replace CORE OPERATING SYSTEM FILES that may be corrupted or missing.

Abort a shutdown command

shutdown /a

Shutdown and reboot

shutdown /r

Shutdown and power off

shutdown /s

Shutdown timer modifier

shutdown /s /t [nn] [nn] is the number of seconds on the timer

Terminate tasks by process id (PID) or image name (command)

taskkill Linux uses killall, kill <PID>, and xkill The Windows taskkill command will terminate tasks by process id (PID) or by the name of the executable. The "taskkill" command is used to terminate tasks at the command line.

taskkill modifiers

taskkill /im <process name> taskkill /PID <1234> /t The /IM option specifies an "image name" or application name. The /PID option and /T (terminate) option terminates a process by using the PID

Display a list of currently running processes (on a local or remote computer)

tasklist (Like Task Manager - no GUI needed) The Windows tasklist command displays a list of currently running processes on a local or remote machine / all running processes in the operating system.

Copies files and directory trees. Copy multiple files and directories at the same time.

xcopy To copy all directories and subdirectories in the Documents directory, except any empty ones, to the m:\backups file, use the /s modifier: xcopy /s Documents m:\backups *notice the BACKslash \ to indicate which directory you want to copy the files to.

Using the help command

• > help [command name] •> [command name] /?


Kaugnay na mga set ng pag-aaral

Chapter 3 - Biology and Behavior

View Set

12.8 File Encryption & BitLocker

View Set

Stroke: Diagnosis, Management, Treatment, Interventions and Rehabilitation

View Set

Chapter 10 Florida statues, rules, and regulations common to all lines

View Set

Chapter 1 De Mesa: The Scientific Method

View Set