How To Use The Help System In Poshbot

We all need a little help now and then. For PoshBot, we have the creator, Brandon Olin showing how to get around in the PoshBot help system.

this techsnip we're going to go over the help system in poshbot. Let's get started. If you install a number of Plugins in poshbot, remembering what each command is and how it works can be a challenge. Just like in powershell, we need a way to find available commands and to inspect those commands to see how they're used poshbot relies heavily on Powershell's help system so it should feel familiar to anyone who's used powershell. The built in command. Get command help is how to find help for commands in poshbot. If you just type get command help with no other parameters. This will return all the commands loaded impossible. Make sure to use the bank symbol before the command name. This tells poshbot that you're running a command and not just chatting. You can see poshbot includes a number of built in commands. They all work differently. Hence, why a help system is needed poshbot also has a notion of aliases and with get command help the aliases our help, and man. I'll go over aliases in more detail in another snip, but for the rest of this snip. I'm going to use the help alias now let's get help against one of the built-in commands. Let's take a look at the install plugin command. Help returns a bunch of useful information such as the full name of the command. What plugin it belongs to any aliases for the command and so forth. If you take a look at the usage property. This will tell you the parameters for the command and whether they are mandatory or optional. Brackets around the parameter name and type mean the parameter is optional. With install plugin you can see that the name parameter is mandatory in the version is optional. Now let's take another look at the help command. We can even run help against itself to see the help information about the command. And you can see the help has 3 different usage scenarios. These mapped different parameter sets just like in powershell with the Help Command. We have the option to pass in a filter string to narrow down the results that help returns. We also have the option to specify a detailed examples or full switch these should be familiar. If we've used to get help in powershell. If we get help for the install Plugin Command and include the examples, which you can see that we get back some examples for how to use the command. And now we run the same command, but use the detailed switch, we can get back a bunch more detail about the parameters for the command, including the examples. And now if we run the command again with the full switch even more information about the parameters is shown as well as the examples and we can even run help against a search string to see what comes back so let's see what comes back by dis running help against the plug-in string. And you can see we have a list of commands here that have plug in in the name and that's how you can use the help system in poshbot.