Chap 10 Flashcards
what are the 4 execution policies (powershell scripts)
1-restricted
2-AllSigned
3-RemoteSigned
4-Unrestricted
what is the powershell execution policy -> restricted?
restricted: means no executable files (.ps1) can run on the computer
what is the powershell execution policy ->
AllSigned?
AllSigned: means all executable files that are digitally signed by a trusted publisher can be executed on the computer
what is the powershell execution policy ->
RemoteSigned?
RemoteSigned: only internet based executable files are required to be digitally signed, all local executable files can be used without a signature.
what is the powershell execution policy ->
unrestricted?
unrestricted: any script can run regardless of origin (not recommended b/c hackers can run scripts on your computer)
what are the 2 parts of an Object in Powershell?
object 2 parts:
1- Properties: parts of object
2-Methods: instructions associated with objects.
what does the pipe symbol between two cmdlets do?
symbol: |
Cmdlet | 2ndCmdlet =
the | pipe command tells the 1st cmdlet output and puts it into the 2nd cmdlet as input.
what cmdlets are used to see the properties of a cmdlet?
get-process | get-member
–> lists all processes then sends output to the ‘get-member’ cmdlet which then displays the instructions associated with each object.
what cmdlet is used to display a prompt to the user? (used in script files often)
Read-Host -Prompt ‘text to display/ prompt to user’
what command is used to remove a variable?
remove -item variable:(variableName)
what does the following syntax in powershell do? get-childitem variable:
lists all the variables used in powershell
what does the following cmdlet do?
get-process
gep-process
used to store a list of processes inside a variable.