Powershell 5 Flashcards
What command would display and sort the contents of a directory into alphabetical order?
get-childitem | sort-object
This command defaults to sorting in ascending alphabetical order
What are the 4 different ways to examine the Help system in Powershell?
- examples
- online
- detailed
- full
What command would run two previously run commands from the Get-History list? In the example run commands 1 and 2 from the list.
invoke-history 1; invoke-history 2
What is the shell as in powerSHELL?
A user interface that gives you access to the operating system.
Just by looking at the shell, how would you know whether or not it was opened as Administrator?
It would say ‘Administrator; on the title bar if it was opened as Administrator.
What Font is good for Powershell?
A matter of preference, but Lucida Console is a good one to use.
What does a parameter do in Powershell?
Parameters alter the command
What command would force an update of the help system in Powershell?
update-help -force
What would be an easy way to get help on get service but only show the syntax part of the help file?
get-help get-service -showwindow
The above command will open a separate window and will allow you to go into settings and choose what part of the help file you want to see.
Parameters alter a command. What character does a parameter always begin with?
Parameters always begin with a dash
eg;
- examples
- onlne
- detailed
- full