Advancing Remote Admin skills
1
Scenario # 1
2
Scenario # 1
3
Mastering Command-Shell Syntax
Syntax:
5
Rules you have to know to play the game
You can learn your syntax now
Or waste time for the next 10 years learning command line syntax
6
Command line shells are unforgiving
7
8
Windows has two command-line environments
PowerShell
Command Shell: CMD
9
Both are known as Command-line Shells
Both are case insensitive shells: FOO.txt = foo.txt = Foo.txt
PowerShell is both a CLI shell and scripting environment
10
Now open-source, cross-platform
11
Ubuntu and PowerShell?
12
Command Shell scripting
13
PowerShell vs CMD
For the most robust, up-to-date Windows automation, Microsoft recommends using PowerShell instead of Windows Commands or Windows Script Host for Windows automation.
14
Developers are syntax masters��Many IT professionals have to learn the craft
15
Command Shell utilities: Server vs client
16
Help is not helpful if you do not know syntax rules
17
Command-line syntax explains how to use the software utility properly
chkdsk [<Volume>[[<Path>]<FileName>]] [/f] [/v] [/r] [/x] [/i] [/c] [/l[:<Size>]] [/b]
18
19
Brackets [ ]
Braces { }
Back Slash \
Slash /
Angle brackets < >
Vertical bar | "pipe"
Space
Text without brackets or braces
Microsoft uses the "/" character
20
chkdsk [<volume>[[<path>]<filename>]]
[/f] [/v] [/r] [/x] [/i] [/c] [/l[:<size>]] [/b]
Unix/Linux ported utilities to Windows
These utilities retain the use of a " – "to indicate a parameter
21
PowerShell choose " - " to indicate parameters
22
PowerShell broke with the command shell standard and moved instead to the use of the "-" for parameters
get-service -ComputerName "localhost" -name "ALG"
Arguments Switches or Parameters?
These terms are confusing regarding CLI shells
23
24
Some command-line utilities
Work without any parameters
25
Some command-line utilities
Will not work without a parameters
26
Some Command Shell utilities create their own shell
27
Command-line syntax key
28
Notation | Description |
Text without brackets or braces | Items you must type as shown. |
Spaces | If you find a space in the command syntax, then you should use it while executing the actual command. |
<Text inside angle brackets> | Placeholder for which you must supply a value. |
[Text inside square brackets] | Optional items. |
{Text inside braces} | Set of required items. You must choose one. |
Vertical bar (|) | Separator for mutually exclusive items. You must choose one. |
Ellipsis (…) | Items that can be repeated and used multiple times. |
Text outside brackets
29
Text outside brackets
30
space
31
Brackets
32
Braces
33
<Text inside angle brackets>
34
Ellipsis ….
35
Pipe
36
Command-line syntax key
37
Notation | Description |
Text without brackets or braces | Items you must type as shown. |
Spaces | If you find a space in the command syntax, then you should use it while executing the actual command. |
<Text inside angle brackets> | Placeholder for which you must supply a value. |
[Text inside square brackets] | Optional items. |
{Text inside braces} | Set of required items. You must choose one. |
Vertical bar (|) | Separator for mutually exclusive items. You must choose one. |
Ellipsis (…) | Items that can be repeated and used multiple times. |
Syntax gives you powerful options
38
CommandA & CommandB (the second command is run directly after the first)
CommandA && CommandB (the second command is only run if the first was successful)
Command A || CommandB (the second command is only run if the first was not successful)
CommandA && CommandB || CommandC (the second command is only run if the first was successful, otherwise the third command is run)
39
Conditional | Processing |
&& | Command1 is success then Command2 runs Command1 && Command2 |
|| | if Command1 fails then Command2 runs Command1 || Command2 |
| Grouping Sets of Commands |
& && | Command3 is run only if Command1/2 are successful (Command1&Command2) && Command3 |
|| & | Command2 and Command3 run only if Command1 fails (Command1 || Command2) & Command3 |
Chkdsk's online docs
40
chkdsk [<volume>[[<path>]<filename>]]
[/f] [/v] [/r] [/x] [/i] [/c] [/l[:<size>]] [/b]
Errors in documentation and online help
41
Mistakes between online help and online docs
42
"&" allows multiple commands
43
44
45
46
Need to execute complex commands?
47
48
Command-line errors
49
More ways to find an error code
50
Download and use the error tool
C:\Tools>Err_6.4.5.exe c000021a
# for hex 0xc000021a / decimal -1073741286
STATUS_SYSTEM_PROCESS_TERMINATED ntstatus.h
# {Fatal System Error}
# The %hs system process terminated unexpectedly with a
# status of 0x%08x (0x%08x 0x%08x).
# The system has been shut down.
# as an HRESULT: Severity: FAILURE (1), FACILITY_NULL (0x0), Code 0x21a
# for hex 0x21a / decimal 538
ERROR_ABIOS_ERROR winerror.h
# An error occurred in the ABIOS subsystem.
# 2 matches found for "c000021a"
51
Be sure to keep your "Error Lookup Tool" up-to-data, download the latest version often.
TechSavvyProductions.com
Understand Secure Boot
52
How secure boot works in Windows 10. Secure boot allows protection from "root-kit" attacks on both clients and servers. Secure provide a trusted path to boot devices. An in-depth look at the technology that allows a validated boot process. Learn about ELAM. A quick look at how Hyper-V supports secure boot.
YouTube: https://youtu.be/ZF1xGdhyUyw
TechSavvyProductions.com
Troubleshooting Hard Disks
53
Troubleshooting non-booting PCs/Laptops, how to test quickly for HD failures. Troubleshooting flash drives and external hard drives. Understanding SMART data and how to use Seagate and Western Digital hard drive diagnostics.
YouTube: https://youtu.be/_UeT7YFdlUs
TechSavvyProductions.com
Troubleshooting Windows 10 Startup: Learn about Startup Settings
54
How to fix many Windows 10 boot failures. How to access advanced Windows 10 troubleshooting tools options "Startup Settings". How to access Windows Recovery, understanding the startup settings, and how to troubleshoot using them.
What is a recovery partition and how to use it? How to use the command line or PowerShell to help you get your PC working. Fixing the BCD registry key. The power of Safe Mode.
YouTube: https://youtu.be/HbTRoQz5E9o
55
Windows Recovery is designed to allow support technicians or help desk to repair various boot problems, file system corruption, system file repair, restore your registry files, and bare metal recovery of your operating system via backups. Windows Recovery allows many command-line tools and even automated tools to run. We will explain WinRE and how to access these repair options. We demonstrate and show how to use many tools and many lesser-known ways of accessing WinRE.
TECHSAVVYPRODUCTIONS.COM
Windows Recovery Environment WinRE: Explained
YouTube: https://youtu.be/6yonrl3LU58
56
Steps to solve difficult Windows 10 boot and startup failure. We will explore from POST to how Windows boot the operating system. How to solve the different problems that cause boot and startup failure.
Understand screen error messages and learn how to use them to point you to the problem. How to use "Startup Repair", "System Restore" and other boot failure tools. Understanding the files critical to boot and where the files can be found on the hard disk.
TECHSAVVYPRODUCTIONS.COM
Windows 10 startup problems: Fixing Boot Problems
YouTube: https://youtu.be/JdRPYjYKc9g
TechSavvyProductions.com
Getting Data off prior to fixing a non-booting PC
57
Getting data off a Laptop or PC when Windows fails to boot properly is critical. A mistake often made is to attempt to repair … DON’T. Get the data or a copy of, off the device prior to working on the boot problem. We will walk you step by step on getting your data off safely using two well tested methods.
We will use a Windows 10 installation flash drive or a Linux bootable flash drive. You can also download our video notes and check out many other options to getting your data safe.
YouTube: https://youtu.be/91A9Jr7Yy14
58
We will cover OM1-OM4 multimode cables, introduce the new OM5 cable for 100-400G. Understand cable connectors used in LAN and today's Data Centers. Build a modern transceiver, learn about SerDez and the critical ASIC chips that drive higher speeds in the Data Center.
A critical view of the cost/benefits of transceiver options. Look at the MPO/MTP connectors and how they transform fiber density.
TECHSAVVYPRODUCTIONS.COM
Fiber Optics in the LAN and Data Center
YouTube: https://youtu.be/fRKT6Z9rgUw
SOCIAL MEDIA
CREDITS
59
Become a member
60
Check out our website: �https://www.techsavvyproductions.com
61
Want an easy and free way to support this Channel?�Please Subscribe!�80% of the individuals who watch our content do not subscribe.�
62
We have subtitles for the following languages:
We translate subtitles on our videos into the following languages: عربى, българскиB, 简体中文), 中國傳統的), Nederlands, Suomalainen, français, Deutsche, हिंदी , , bahasa Indonesia, 日本語, 한국어, norsk, Polskie, português, Română, український, eesti keel, Española, lietuvių, latviski , Svenska, čeština, dansk, Ελληνικά, հայերեն, shqiptare, and Tiếng Việt
63
�A BIG THANK YOU TO ALL OF OUR VIEWERS AND SUBSCRIBERS!�
64
65
От Иоанна 3:16
16 Бо так сильно полюбив Бог цей світ, що віддав Свого Єдиного Сина заради того, щоб кожен, хто в Нього вірує, не був загублений, а здобув вічне життя.