PowerShell : Get-Service with Startup Status

Since the default Get-Service in Windows 2012 R2 does not included the Startup Type, I have to manually prepare the following to get the Name, StartUp and Status  and export to CSV file for Reference

$NameOfService= Get-Service | Select Name, Status 

foreach ($Name in $NameOfService ) {

$S = $name.Name

$StartUp=Get-WmiObject -Class Win32_Service -Property StartMode -Filter "Name= '$s'" | Select StartMode

foreach ($Start in $StartUp ) {

$Report = New-Object psobject 
$Report | Add-Member NoteProperty -Name "Name" -value $name.Name
$Report | Add-Member NoteProperty -Name "Startup" -value $Start.StartMode
$Report | Add-Member NoteProperty -Name "Status" -value $name.Status

#Write-Output $report 
$Report | Export-Csv -path C:\Temp\StartUp.csv -Append -NoTypeInformation
    }
}
	

Sample of Exported CSV file after exporting to Excel with Data Filtering

PowerShell-Status