Monday, July 23, 2018

Command to get windows services and windows features

Following are the PowerShell script and Command to get the Windows Servers and Windows Roles and features list

Get Services using PowerShell

Import-Module Servermanager
Get-Service | Export-Csv -path "H:\SharePoint\Services_Features\MYUATSQL_services.csv"
Get-WindowsFeature | Export-Clixml "H:\SharePoint\Services_Features Report\MYUATSQL_features.xml"

Get Service logons details using command prompt.

wmic service get name,startname> "H:\SharePoint\Services_Features\MYUATSQL_serviceLogons.csv"