Discover commands in PowerShell Flashcards

1
Q

Discover cmdlets by using the help system and Get-Help

A

You can use the Get-Help core cmdlet to learn more about a command. Typically, you invoke Get-Help by specifying it by name and adding the -Name flag that contains the name of the cmdlet you want to learn about. Here’s an example:

Get-Help -Name Get-Help

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

Update help

A

New versions of PowerShell don’t include the help system by default. The first time you run Get-Help, you’re asked to install the help files. You can also run the Update-Help cmdlet to install the help files. Because a call to Update-Help downloads many help files, the command can fetch only once per day by default. You can override this fetching behavior by using the -Force flag.

You update the help files differently on Windows compared to Linux or macOS. The process differs because when you run the Update-Help cmdlet, help files are fetched over the internet by matching your computer’s culture. On Windows, a culture is already installed, but it’s missing on Linux and macOS. So you need to specify a culture when you update help files on Linux and macOS.

Update-Help -UICulture en-US -Verbose

This command specifies the -UICulture flag. It gives it the value en-US, which fetches US English help files. To update your help files on macOS or Linux, use a culture that corresponds to your machine’s culture.

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

NAME

A

Provides the name of the command.

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

SYNTAX

A

Shows ways to call the command by using a combination of flags, and sometimes, allowed parameters.

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

ALIASES

A

Lists any aliases for a command. An alias is a different name for a command, and it can be used to invoke the command.

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

REMARKS

A

Provides information about what commands to run to get more help for this command.

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

PARAMETERS

A

Provides details about the parameter. It lists its type, a longer description, and acceptable values, if applicable.

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

Filter the help response Full

A

Returns a detailed help page. It specifies information like parameters, inputs, and outputs that you don’t get in the standard response.

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

Filter the help response Detailed

A

Returns a response that looks like the standard response, but it includes a section for parameters.

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

Filter the help response Examples

A

Returns only examples, if any exist.

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

Filter the help response Online

A

Opens a web page for your command.

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

Filter the help response Parameter

A

Requires a parameter name as an argument. It lists a specific parameter’s properties.

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