Powershell 1 Flashcards
What is Powershell used for?
Task Automation and Configuration Management
What Commandlet would you use at the start of your session to record your input into Powershell and save it as a text file?
start-transcript
How would you complete a commandlet without typing it fully?
Press ‘Tab’ key
If you want to get help on a particular commandlet and also some examples of how the commandlet is used, what command would you use?
(create a command that shows help and examples of the Get-service commandlet)
get-help get-service -examples
If you want to get help for a particular commandlet online, what command would you use?
(create a command that shows online help for the Get-service commandlet)
get-help get-service -online
A Powershell command that doesn’t use the form of verb-noun is known as an……..?
Alias
Using the example of the Alias ‘CLS’ to clear your screen, what Powershell command would you use to find the Powershell commandlet?
get-alias cls
What character is a variable always preceded with?
$
Dollar Sign
What command would assign the word ‘hello’ to the commandlet get-date ?
$hello = get-date
What commandlet would you use to show a list of all the commands you have run in your session?
get-history
What commandlet would show what the execution policy is set to?
get-executionpolicy
What command would you use to go the following location:
C:\Users\petej\Documents
set-location c:\users\petej\documents
What command would show the properties and Methods of a commandlet?
(Use get-service in your example)
get-service | get-member
What command would show the status of the services on the device?
(We only want to see the name and the status column)
get-service | select-object name,status
CLS is used to clear the screen. CLS is the alias of which Powershell commandlet?
clear-host