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 for($count=1; $count -le 10; $count++) { write-host "Number $count"} condition after the code

1.1.2. while loops $count=1 While ($count -lt 11) { write-host "Number $count" $count++} 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 require application to complete function not typed 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 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 value number text aka string boolean array

3.2. Branch Logic

3.2.1. deviate/branch depending on condition 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 browse to folder shift right click in folder select open powershell

4.7.2. windows 7/8 browse to folder shift right click in folder select open command window here

5. Variables

5.1. Data Types

5.1.1. Integers whole numbers

5.1.2. Strings text

5.1.3. Floating point 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 Defined for use by system/user/program

5.5.2. User Variable Defined for use by specific user or any program executing under specific user

5.5.3. Program Variable 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 #