I'm trying to create a task sequence step that installed the SNMP service for a 2008 R2 server and I cannot get it to work. I have tried several things I have found out on the internet, from create a package with several different command lines to just running a command line task step and none have worked.
The last thing I tried was running the following command line in a Program:
powershell.exe get-content '.\2008InstallSNMPService.ps1' | powershell.exe -noprofile -
The ps1 file contains the following, which works when an OS is booted:
import-module servermanager
add-windowsfeature snmp-service
Can anyone help me get this figured out? TIA