PowerShell Basics Flashcards Preview

PowerShell > PowerShell Basics > Flashcards

Flashcards in PowerShell Basics Deck (27)
Loading flashcards...
1

What is the verb to create?

New-

2

What is the verb to retreive/show?

Get-

3

What is the verb to make a configuration change?

Set-

4

What is the verb to delete?

Remove-

5

What is the verb to rename?

Rename-

6

What is the shortcut to complete a partially typed command?

Tab

7

What is the shortcut to go back in a partially typed command?

Shift + Tab

8

What is the pipeline?

Passing data from one command through to another

9

Why is the pipeline useful?

It pipes data object, text that has to be parsed

10

What is the parameter to see the outcome of executing a command without doing it?

-WhatIf

11

What is the naming convention in PowerShell?

Verb-Noun

12

What is the cmdlet to retrieve a list of all verbs?

Get-Verb

13

What is the symbol used to get all values associated to a parameter?

*

14

How would you get all values beginning with a set of characters?

(characters)*
i.e: ms*

15

What separates a parameter and its value?

A space
i.e: -Name vm

16

What strings together multiple parameter values?

A comma
i.e: Computername CL1,CL2,CL3

17

What is a positional parameter?

Parameters that are associated without specifying based on order

18

How do you get all the values containing a set of characters?

*(characters)*
i.e: *dns*

19

What command wold you issue to search for the help files about commands?

Get-Help -Name *about*

20

When should you update help?

After installing new roles and features

21

How do you output a commands response to a file?

| Out-File C:\Location\Filename.extension

22

How do you see a list of previously executed commands within the current session?

Get-History

23

How do you invoke a command that has previously been run?

Invoke-History -id n

*n is the number of command to be invoked

24

How do you create a log of all the command made?

Start-Transcript C:\Location\Filename.extension

Stop-Transcript

25

How do you list the contents of a directory?

Get-Childitem C:\

26

How do you list the contents of a directory and its sub folders?

Gt-Childitem C:\ -Recurse

27

What is the Get-Member command used for?

To get the properties and methods of objects

Properties are values associated with objects
Methods are things that can be performed on objects