Update Services Scripts/Service - Dell SupportAssist Service - Start.ps1
This commit is contained in:
+24
-24
@@ -1,25 +1,25 @@
|
|||||||
<#
|
<#
|
||||||
Author: Leng Yang
|
Author: Leng Yang
|
||||||
Date: 05-14-25
|
Date: 05-14-25
|
||||||
|
|
||||||
.Synopsis
|
.Synopsis
|
||||||
Sets Dell SupportAssist service to automatic startup and attempts to start it.
|
Sets Dell SupportAssist service to automatic startup and attempts to start it.
|
||||||
|
|
||||||
.Modified
|
.Modified
|
||||||
05-14-25 (LengY) - Original script created
|
05-14-25 (LengY) - Original script created
|
||||||
05-15-25 (GabeK) - Code Reviewed
|
05-15-25 (GabeK) - Code Reviewed
|
||||||
#>
|
#>
|
||||||
|
|
||||||
$service = Get-Service | Where-Object { $_.DisplayName -like "*dell supportassist*" } | Select-Object Name
|
$service = Get-Service | Where-Object { $_.DisplayName -like "*dell supportassist*" } | Select-Object Name
|
||||||
|
|
||||||
# Start Script #
|
# Start Script #
|
||||||
If ($service) {
|
If ($service) {
|
||||||
Write-Host "Found $($service.name). Starting service and setting to automatic startup."
|
Write-Host "Found $($service.name). Starting service and setting to automatic startup."
|
||||||
Set-Service -Name $service.name -StartupType Automatic
|
Set-Service -Name $service.name -StartupType Automatic
|
||||||
Start-Service -Name $service.name -ErrorAction SilentlyContinue
|
Start-Service -Name $service.name -ErrorAction SilentlyContinue
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
Get-Service | Where-Object { $_.DisplayName -like "*dell supportassist*" } | Select -Property displayname, starttype, status
|
Get-Service | Where-Object { $_.DisplayName -like "*dell supportassist*" } | Select -Property displayname, starttype, status
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
Write-Host "May need to reboot to start service."
|
Write-Host "May need to reboot to start service."
|
||||||
}
|
}
|
||||||
# End Script #
|
# End Script #
|
||||||
Reference in New Issue
Block a user