A+2 4.8 Scripting Basics

A certification - Scripting and Remote Access

Get Started. It's Free
or sign up with your email address
A+2 4.8 Scripting Basics by Mind Map: A+2 4.8 Scripting Basics

1. basic loops

1.1. 2 basic

1.1.1. for loops

1.1.1.1. for($count=1; $count -le 10; $count++) { write-host "Number $count"}

1.1.1.2. condition after the code

1.1.2. while loops

1.1.2.1. $count=1 While ($count -lt 11) { write-host "Number $count" $count++}

1.1.2.2. condition before the code

2. Scripting - high level program language

2.1. programming pyramid

2.1.1. scripting highest interpreted , don't have to compile

2.1.1.1. require application to complete function

2.1.1.1.1. not typed

2.1.1.1.2. don't need variables

2.1.2. High level programming languages like Java compiled

2.1.3. Assembly Language - low level programming language compiled

2.1.4. executable Machine Code above hardware

2.1.4.1. executable machine code, interacts with Hardware

2.1.5. Hardware lowest

3. Constructs

3.1. variables

3.1.1. symbolic words- identify a storage area with value

3.1.1.1. value

3.1.1.1.1. number

3.1.1.1.2. text aka string

3.1.1.1.3. boolean

3.1.1.1.4. array

3.2. Branch Logic

3.2.1. deviate/branch depending on condition

3.2.1.1. if($str -eq 1) {write-host "Yes"} Else {Write-host "No"}

4. Windows Batch Scripts

4.1. original interpreter command.com

4.2. updated cmd.exe

4.3. both .bat and .exe filetypes

4.4. fast way to get things done, list of commands

4.5. REM comment

4.6. branching logic (if and goto)

4.7. open command prompt - specific folder

4.7.1. windows 10

4.7.1.1. browse to folder shift right click in folder select open powershell

4.7.2. windows 7/8

4.7.2.1. browse to folder shift right click in folder select open command window here

5. Variables

5.1. Data Types

5.1.1. Integers

5.1.1.1. whole numbers

5.1.2. Strings

5.1.2.1. text

5.1.3. Floating point

5.1.3.1. decimals

5.2. Reserved word used by scripting /programming language can not be used as variable by programmer

5.3. variable name should have relevant meaning

5.4. Type

5.4.1. loosely typed variable types need not not be defined

5.4.2. Strong type variable type must be defined

5.5. Environmental Variables

5.5.1. System Variable

5.5.1.1. Defined for use by system/user/program

5.5.2. User Variable

5.5.2.1. Defined for use by specific user or any program executing under specific user

5.5.3. Program Variable

5.5.3.1. defined for use inside script or application

5.5.4. Information about the environment

6. Comment syntax

6.1. For end user readability not executed

6.2. 3 basic components

6.2.1. author name

6.2.2. authored date

6.2.3. purpose of script

6.3. best practice not required

6.4. power shell #