Hello,
I have been trying to figure out why this command is not doing what it needs to do through SCCM as a package. I have no issue when running the command locally form a machine with administrative rights.
Here's what I've tested so far to no avail.
Source script file named as: EnableSMB1.0.cmd
Program name = Run PS
command line: EnableSMB1.0.cmd
Run = Normal (because I want to see this)
Program can run = whether or not a user is logged on
Run mode = Run with admin | Allow users to interact with this program
Here is the command for the .cmd file.
@Echo off
echo.
Dism.exe /online /Enable-Feature /All /FeatureName:SMB1Protocol
Exit
For powershell:
Source script file named as = EnableSMB1.0.ps1
command line =
powershell -ExecutionPolicy Bypass -file .\EnableSMB1.0.ps1
Powershell script test#1
Dism.exe /online /Enable-Feature /All /FeatureName:SMB1Protocol
Powershell script test#2
$FeatureName = "SMB1Protocol", "SMB1Protocol-Client", "SMB1Protocol-Server"
Enable-WindowsOptionalFeature -Online -FeatureName $FeatureName
Looking at the execmgr.log these are the only two events that I got:
- Policy is updated for Program: Run PS, Package: Test1232 Advert: Test2222
execmgr
4/10/2019 3:30:34 PM
4796 (0x12BC)
- Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="Test1232",ProgramID="Run PS", actionType 45l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l
execmgr
4/10/2019 3:30:34 PM
4796 (0x12BC)
If anyone had seen this before or can shed some light it would be grateful.