Steps To Creating A PS Script Flashcards

1
Q

How to type multi line comment?

A

<#words#>

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

How do you sign a script?

A

Must sign with a code signing certificate

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

What are the two types of certificates?

A

Public cert, self-signed cert

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

What are functions?

A

The building block of PS scripts, allowing you to construct your code into logical reusable components.

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

What are the differences between arguments and parameters?

A

Arguments
Are not specific within a function
Are populated by passing values as part of the execution
- is PS script is Test.ps1 you’d call it as test.ps1 ‘space’ and anything in the spaces are the arguments
Values are retrieved by using ID or offset

Parameters
Variable defined in a function
Value is populated when calling the function
- load test PS1 then call a function that may say ‘newmsg’ with a property that has a value
Have properties
Can be mandatory or optional

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