Get-Help & Get-Command

Vijay Saini
A free video tutorial from Vijay Saini
Dreamer of educated world
4.3 instructor rating • 11 courses • 32,483 students

Learn more from the full course

Advanced Scripting & Tool Making using Windows PowerShell

PowerShell | Simplified advanced training on PowerShell with real world problems, PowerShell Automation & PowerShell Lab

06:21:11 of on-demand video • Updated November 2020

  • Full of hands-on instructions, interesting and illustrative examples, clear explanations
  • Learn an important and mandatory skill for Windows Server Administration
  • Deep dive into Windows PowerShell scripting
  • Ability to use PowerShell in association with tools like Task Scheduler/Event Viewer/Databases
  • Design and Implement scalable automation solutions
  • Underlying concepts of PowerShell
  • Object based Scripting, In-depth knowledge of Pipeline, Formatting output into professional reports
  • Automate manual reports
  • Create your own PowerShell modules
English Hello & welcome to this lecture. This whole lecture is going to be revolving around ... PowerShell's help section. We have cmdlet called ... Get-Help. This command provides help ... about all command lets of our PowerShell. But it is not restricted up to providing syntax and a brief ... description about a command. Believe me it is much more than that. And you are going to love this help command after finishing ... this lecture. That is a promise. All right. Firstly, We need a list of all different commands available in our ... PowerShell. Though our ISE is smart ... enough to provide the list of commands in this right side ... menu. But still we should ... understand underlying command for it. All PowerShell commands are named in a fixed pattern ... of Verb-Noun. So in this case I want to ... "GET" the list of "COMMAND" So we need to type Get-Command and hit enter ... and you will get the list of command From this big list If you want to search a specifyic ... command by a key word, you can simply pass input to ... name parameter and say you want all commands which ... has service in its name. This star is considered a ... swild card character and it ask PowerShell to ignore ... characters after or before it . hit enter and here you go. We now have filtered output which has word service in its ... name. In case you want to see first ... elemenets or last few elements you can place a ... pipe and select first 5, or select last 5 and you will ... be getting the expected output Coming back to the main topic of this lecture. Now I can see that there is some command called ... get-Service. But I don’t know anything ... about it and I need to visit its help section. Lets go for it. We just need to type Get-Help space and ... get-Service. Hit enter and we can see ... help section. We have synopsis for this ... command and then different ways of using it in Synatx and ... then a detailed description etc in this help section. Is it very nice looking. It is OK not bad. But it is not looking very comfortable. We don’t have examples in this and help is not very ... detailed one. Allright we can specify parameter full in the end of statement to get ... the complete help for this command. And yeah now you see it. You have got whole bunch of ... Help section including the examples and explanation of ... each of the parameter which this Get-Service can accept. Also, If you are not comfortable ... with navigating in this ISE console, you can put parameter online and you will be redirected to ... the browser where you will get detailed help and it is ... easy to scroll up & down and find the required text. Now you can say that though help is detailed one but I am ... still struggling in scrolling up & down in order to get the section I am looking for. Well full proof & my favourite way is type ... -Showindow in front of any help commandlet and hit ... enter. Here you go. You can see this separate window designed by ... PowerShell only for making the help section comfortable ... has opened and you can choose what section you ... want to see from settings. You can search by key word ... as well. How cool is that. I will leave up to you to explore this help section more in detail So we have discussed how to get the help for a ... commandlet but that is not it . Lets say you want to get help ... to understand what exactly is this ISE. Or lets say what exactly is a for loop. In that case you are not really looking for the syntax and ... description of a command but about a concept. PowerShell has provision to teach you concept as well ... and not just the commands. To get the list of concept based help topics , we can write Get-Help and about * . This star again means wild ... card and in this case, it will get the list of all help ... topics which starts with about. All right hit enter and here you go. We can see the list of all different about concepts. Lets say if you want to understand about arrays. Just pick the topic name and try to get help for it. Here we go. We have whole bunch of text ... describing PowerShell array. Similarly you have kind of ... knowledge articles on lots of other topics. I would recommend you to go through few of these topics ... and gain some knowledge about what we have ... discussed so far. Lets discuss few additional help related commands now. First is Update-Help. So when we execute this ... command in our Shell, It downloads latest available ... help from Microsoft site and keep us to up to date with ... PowerShell Help. To know about it more in ... detail you can always use Get-Help again. I am cancelling this as I am already up to date with help. Also, To save the help section into ... file system, we can use Save-help cmdlet ... and we just need to specify the file location where we ... want the help files to be saved. All right. Thats it for this lecture. I recommend you to go through few help topics. You will get a fair idea. and we will be needing this ... idea when we will be creating our own CMDLETS later in ... the course.Thank You