From the course: Complete Guide to Microsoft 365 for Administrators by Microsoft Press
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Managing Microsoft 365 with Windows PowerShell - Microsoft 365 Tutorial
From the course: Complete Guide to Microsoft 365 for Administrators by Microsoft Press
Managing Microsoft 365 with Windows PowerShell
- [Instructor] So Window's PowerShell is based on a verb and noun construction. The verb is the action that you want to perform, get, set, add, and so on. The noun is the resource, service, local user, and so on. Note that the noun is always singular, despite the fact that you're dealing with objects that are pluralized. So some examples. In this example, we're retrieving a list of services, Get-Service, and then we're filtering the return list by using Where-Object. And then in brackets, we're specifying that we're looking for objects that have a status that's equal to Running. And we separate those two commands, Get-Service and Where-Object by using the vertical pipe operator. A similar construction here. Get-Service is retrieving a list of services. Now we're looking for a subset of those based on the fact that the name of the service starts with win and then an asterisk, that's a wild card. So any service that…