Files
Powershell-Scripts/Services Scripts/Service - Start Dell SupportAssist Service.ps1
T

25 lines
836 B
PowerShell

<#
Author: Leng Yang
Date: 05-14-25
.Synopsis
Sets Dell SupportAssist service to automatic startup and attempts to start it.
.Modified
05-14-25 (LengY) - Original script created
05-15-25 (GabeK) - Code Reviewed
#>
$service = Get-Service | Where-Object { $_.DisplayName -like "*dell supportassist*" } | Select-Object Name
# Start Script #
If ($service) {
Write-Host "Found $($service.name). Starting service and setting to automatic startup."
Set-Service -Name $service.name -StartupType Automatic
Start-Service -Name $service.name -ErrorAction SilentlyContinue
Write-Host ""
Get-Service | Where-Object { $_.DisplayName -like "*dell supportassist*" } | Select -Property displayname, starttype, status
Write-Host ""
Write-Host "May need to reboot to start service."
}
# End Script #