Chap 10 Flashcards

1
Q

what are the 4 execution policies (powershell scripts)

A

1-restricted
2-AllSigned
3-RemoteSigned
4-Unrestricted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is the powershell execution policy -> restricted?

A

restricted: means no executable files (.ps1) can run on the computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is the powershell execution policy ->

AllSigned?

A

AllSigned: means all executable files that are digitally signed by a trusted publisher can be executed on the computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is the powershell execution policy ->

RemoteSigned?

A

RemoteSigned: only internet based executable files are required to be digitally signed, all local executable files can be used without a signature.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is the powershell execution policy ->

unrestricted?

A

unrestricted: any script can run regardless of origin (not recommended b/c hackers can run scripts on your computer)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what are the 2 parts of an Object in Powershell?

A

object 2 parts:
1- Properties: parts of object
2-Methods: instructions associated with objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what does the pipe symbol between two cmdlets do?

symbol: |

A

Cmdlet | 2ndCmdlet =

the | pipe command tells the 1st cmdlet output and puts it into the 2nd cmdlet as input.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what cmdlets are used to see the properties of a cmdlet?

A

get-process | get-member
–> lists all processes then sends output to the ‘get-member’ cmdlet which then displays the instructions associated with each object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what cmdlet is used to display a prompt to the user? (used in script files often)

A

Read-Host -Prompt ‘text to display/ prompt to user’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what command is used to remove a variable?

A

remove -item variable:(variableName)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what does the following syntax in powershell do? get-childitem variable:

A

lists all the variables used in powershell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what does the following cmdlet do?

get-process

A

gep-process

used to store a list of processes inside a variable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly