Services management during OSD Task Execution

Hello Friends, During the OSD Task Sequence execution process, We have to disable and stop some services, or sometimes we have to enable and start the services from Windows services.msc console.

We can use cmdlet from PowerShell "set-service" to manage the services on the windows operating system.

To manage the bunch of services during Task Sequence execution, We have created the below PowerShell script and managed some of the services. you can change the service name and startup type as per your requirement.

also, you can use this PowerShell script before capture the WIM file or it can be used during the TS execution time. in both scenarios, we can manage the services.

Services management during OSD Task Execution
Use the below script to manage the services during OSD.

<#

    .SYNOPSIS

    Manage the services on the windows operating system. using PowerShell script.

    .DESCRIPTION

    This script will manage the bunch of services during Task Sequence execution and help OSD administrators to reduce the overall installation time and make their life easy.

    .NOTES

    =============================================================================================================================================

    Created with:     Windows PowerShell ISE

    Created on:       Tuesday, August 08, 2022, 03:05:03 PM

    Created by:       Dashrath Chate

    Organization:     Your Company Name

    =============================================================================================================================================

#>

#Set Services Startup

Set-Service -Name CertPropSvc -StartupType Automatic -ErrorAction SilentlyContinue

Set-Service -Name DiagTrack -StartupType Automatic -ErrorAction SilentlyContinue

Set-Service -Name IKEEXT -StartupType Automatic -ErrorAction SilentlyContinue

Set-Service -Name SCardSvr -StartupType Automatic -ErrorAction SilentlyContinue

Set-Service -Name tzautoupdate -StartupType Automatic -ErrorAction SilentlyContinue

Set-Service -Name TabletInputService -StartupType Manual -ErrorAction SilentlyContinue

Set-Service -Name WlanSvc -StartupType Manual -ErrorAction SilentlyContinue

Set-Service -Name WbioSrvc -StartupType Manual -ErrorAction SilentlyContinue

Set-Service -Name WerSvc -StartupType Disabled -ErrorAction SilentlyContinue

Set-Service -Name RasMan -StartupType Automatic -ErrorAction SilentlyContinue

Set-Service -Name TrustedInstaller -StartupType Manual -ErrorAction SilentlyContinue

Set-Service -Name WinRM -StartupType Automatic -ErrorAction SilentlyContinue

No comments:

Post a Comment

Leave your valuable words here for improve better.