Upload files to "Services Scripts"
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
<#
|
||||||
|
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 #
|
||||||
Reference in New Issue
Block a user