Get-Service and Get-Member

Keyboard Shortcuts

Under all PowerShell cmdlets are a number of properties and methods. In this video we will learn how to see what properties make up any PowerShell object, by using the Get-Member cmdlet. Developers in your organization may also be swayed by the power behind PowerShell with this simple cmdlet

- [Voiceover] So let's actually run our first cmdlet…inside of PowerShell, and if you've never run PowerShell…you're gonna run the first cmdlet I ever ran…when I started working with PowerShell many years ago,…and that is Get Service.…I'm just gonna type in Get-Service my good ol' friend…and hit Enter, and it's gonna give me…a list of results of all the services.…Now you might be thinking, "Matt, I have a control…panel to do that for me."…You're exactly right, but remember the power…behind PowerShell is I can do this not only…on the server that I'm sitting on,…but all my other remote servers.…There's another parameter called Computer Name that I can…send in to Get Service, that'll find out information for me…across the services inside of my environment.…

You'll also notice that I have three parameters,…Status, Name and Display Name that came back up.…Well one of the great things that I can do here…is I can actually query those services in and find out…information; let's say that I wanna find out…all the services that are currently stopped via PowerShell.…

Resume Transcript Auto-Scroll

Author

Released

5/20/2016

What is PowerShell? PowerShell is a powerful language used for scripting and automation for your IT Infrastructure. In this short course, author Matt Hester provides an overview of the most current release, PowerShell 5.0, including how to read the PowerShell language and scripts, get help, and use cmdlets.

Matt then dives into PowerShell's functions and What If statements, working with output, and coding in the Integrated Scripting Environment (ISE). The course wraps up with some tips on using PowerShell for both on-premises and cloud deployments involving Office 365 and Azure.