From the course: Complete Guide to PowerShell 7
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Working with services - PowerShell Tutorial
From the course: Complete Guide to PowerShell 7
Working with services
- [Instructor] Now just like the processes, we can use Get-Service. So I'm going to select this one to retrieve services. And so this will be a longer list, but you can recognize some of these. These will be the Windows update services and things like that, things that you would access within Services snap-in. Now we can do the same process as we've done with the processes, where we can go and retrieve a specific service or list of services, and sort them by their current status. So let's do Run Selection. And of course it comes back and says, oh, I don't actually have permission to do certain things. And that's actually just an issue with that specific service. But if I say allServices, you can see that I have them, and they are structured by their status. So we've got running and stopped. So you can see they're in order already. Now of course what we can do is combine that with our forEach-Object, and write those out if we need to as well. Now of course we can also filter by…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Basic command structure12m 11s
-
(Locked)
Running simple commands6m 45s
-
(Locked)
Using Get-Command6m 15s
-
(Locked)
Using Get-Help5m 57s
-
(Locked)
Common cmdlets overview6m 57s
-
(Locked)
Managing processes with Get-Process8m 1s
-
(Locked)
Working with services6m 37s
-
(Locked)
Running scripts interactively5m 22s
-
-
-
-
-
-
-
-
-
-
-