Start 802.1x Wired AutoConfig Service with PowerShell in MDT

Hi Guys,

I’m going to show you about a Power Shell script in MDT. The infrastructure is using IEEE 802.1X authentication. So when deploying a new computer the service Wired Auto Config Service, service name dot3svc must be started automatically at Windows startup.

First you need to create Power Shell script and save it.

It should look like this

get-service -DisplayName ‘Wired AutoConfig’ | set-service -StartupType Automatic -Status Running

or like this

get-service -DisplayName ‘Wired AutoConfig’ | Set-Service -StartupType Automatic
get-service -DisplayName ‘Wired AutoConfig’ | Set-Service -Status Running


I tried PS Scripts looking like this but it didn’t work.

Example 1
get-service -DisplayName ‘Wired AutoConfig’ | Set-Service -StartupType Automatic | Set-Service -Status Running

Example 2
get-service -DisplayName ‘Wired AutoConfig’ | Set-Service -Status Running | Set-Service -StartupType Automatic

I guess it’s not accepted because of this

Now we have our PS cmdlets combined and saved into a PS1 file,  we are able to go to MDT and in Task Sequences right click on the Task you want to add this PS Script, go to Properties and on Task Sequence tab.

Go to Custom Tasks under the State Restore. Go to Add and under General choose Run Power Shell Script.

Next step is to tell Task where this script is located give the script name and you done.



Don’t forget to update share.


Hope you get the help you needed. Stay tune and stay sexy.