2. PowerShell Basics

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/7

flashcard set

Earn XP

Description and Tags

Pipelines, loops, error handling, control flow, conditional logic

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

8 Terms

1
New cards

What is a pipeline?

A pipeline is a method for chaining together commands in a singl, allowing the output of one command to be used as the input for the next.

2
New cards

How do you add a pipeline?

You add one using |

Example: command1 | command2 | command 3

3
New cards

Use a pipeline to get the notepad service then stop it.

Get-Process notepad | Stop-Process

4
New cards

Not all commands can be piped. How can you check whether a command can be piped?

Use the get-help command. Under “-InputObject” it will say whether the command accepts pipeline inputs.

<p>Use the get-help command. Under “-InputObject” it will say whether the command accepts pipeline inputs.</p>
5
New cards

You want to find out if the get-process command accepts pipeline inputs. What command would you type?

get-help -name get-process -full

6
New cards

How many commands can you chain together via the pipeline?

as many as you want

7
New cards

In VS Code, if you only want to run a specific portion of your script, how do you do it?

Highlight the lines you want to run and click Run

8
New cards