From the course: Complete Guide to PowerShell 7

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Using Get-Command

Using Get-Command

- [Instructor] Now, the Get-Command command allows us to retrieve information about specific cmdlets or modules. So if we choose Get-Command, just right click here and choose Run Selection, it's going to take a while, but it's going to load all of the commands that exist within any of the modules that we've installed into our PowerShell environment. So let's just clear that. What we can do, for example, is make this a little bit easier to view. So we can load all of that into a variable and then we could simply say, well, let's just format this using a foreach object. And we could just run that. And of course, there's going to be loads and loads and loads of them. So this is one way you might want to output to a different file. But you can see it's going to give us the command, it's going to give us the type of whether it's a script or function or whatever else, and then the module that it's supposed to exist in. And of course, I'm going to try and terminate that 'cause there's so…

Contents