chapter 2.1 Scripting

Get Started. It's Free
or sign up with your email address
chapter 2.1 Scripting by Mind Map: chapter 2.1 Scripting

1. Scripting

1.1. Benefits of using scripts:

1.2. Automate repetitive work

1.3. Perform jobs that are difficult or time-consuming if done manually

1.4. Able to set up self-running automation agents that can response or react to situations

2. Working with filter

2.1. Used to operate on each object in a pipeline

2.2. Cmdlets for filtering

2.2.1. Where-object

2.2.2. Select-object

3. About Cmdlets commands

3.1. This command lists all cmdlets.

3.2. This command lists all processes on the computer

3.2.1. Get-Process

3.3. This command starts a service.

3.3.1. Start-Service

3.4. This command lists all cmdlets.

3.4.1. Get-Command

4. piping output to a file

4.1. out file

4.1.1. writes data in the pipeline to a text file

4.1.2. output file formatted exactly as screen output

5. Cmdlet Verbs commands

5.1. Queries specific object for value

5.1.1. Get-Process

5.1.2. Get-Process

5.2. Set or update settings of an object

5.2.1. Set-Date

5.3. Enable an option/feature

5.3.1. Enable-ScheduledTask

5.4. Disable an option/feature

5.4.1. Disable-RemoteDesktop

5.5. Create a new instance of an item

5.5.1. New-Alias

5.6. Remove an instance of an item

5.6.1. Remove-Printer

5.7. Write to terminal or shell

5.7.1. Write-Host

5.8. stop a service

5.8.1. Stop-Service

6. Start a service

6.1. Start-Service

7. Full command syntax

7.1. Not all commands are just a simple Verb-noun combination.

7.2. Some commands require you to supply parameters.

7.3. Examples – could be Application log, Security log, System log, etc.

7.4. Need to supply the parameters to the commands to make it more specific

8. Working with pipeline

8.1. The output object of one command can serve as an input object for another command.

9. variables

9.1. is a named,temporary storage container for objects

9.1.1. store infos used in script

9.1.2. can store text,interger and object

9.1.3. can store more than one object

10. Shortened Command Syntax

10.1. Command syntax can be shortened by using

10.1.1. Aliases instead of command names

10.1.2. Positional parameters

10.1.3. Truncated parameter names