Microsoft Windows services allow running long-running applications in the background. When computer boots, services start automatically and keeps running until the computer turns off but you can stop and disable the service too. Windows services application list all the services including those are running and those who are stopped.
If you want to save the list of these services in an external file for record or for sharing, there is no option in the application to save the files.
In this article, I will demonstrate to you how you can save a list of Windows services to a file in using PowerShell in Windows 10. to get started with, type powershell.exe in the search bar of windows, and then press Ctrl+Shift+Enter to launch PowerShell with administrator privileges.
Enter the following command. It will list all the running services.
Get-Service | Where-Object {$_.Status -eq "Running"}
Image may be NSFW.
Clik here to view.
Save Running Services to a File
To save this list, add the below command:
Get-Service | Where-Object {$_.Status -eq "Running"} | Out-File -filepath "$Env:userprofile\Desktop\active_services.txt"
Image may be NSFW.
Clik here to view.
This will create a new text file with the name specified in the command. You can open it in notepad.
Image may be NSFW.
Clik here to view.
Save Stopped Services to a File
To save stopped series list in a file, add the below command:
Get-Service | Where-Object {$_.Status -eq "Stopped"} | Out-File -filepath "$Env:userprofile\Desktop\inactive_services.txt"
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
All Windows Services
To save a list of all windows services including running and stopped, add the below command:
Get-Service | Out-File -filepath "$Env:userprofile\Desktop\all_services.txt"
Image may be NSFW.
Clik here to view.
It will save the list of all windows services in the text file.
Image may be NSFW.
Clik here to view.
Hence you can save running services, stopped services and even all services to an external text file that you can later view in notepad editor and can also share it.
The post Save List of Services to File using PowerShell in Windows 10 appeared first on FAQforge.