locked
WinRM endless loop script/package sccm 2012 RRS feed

  • Question

  • I'm trying to enable winrm in task sequence for sccm 2012 during installation of Windows 7 clients.

    winrm quickconfig -quiet -force

    or

    cmd /c winrm quickconfig -quiet -force

    I have tried variations of this but I always get an endless loop, doesn't matter if I do command line or a package with a bat file.

    Anyone else having this issue?

    Thursday, December 4, 2014 7:09 AM

Answers

All replies

  • Loop? Was do smsts.log and execmgr.log tell then?

    Torsten Meringer | http://www.mssccmfaq.de

    Thursday, December 4, 2014 7:23 AM
  • What I mean with loop, is that it keeps rerunning the same command over and over again. In task manager I see multiple cmd processes running. If I manually run the command in cmd it configures it correctly.

    Here is the essential part of execmgr.log:

    <![LOG[Successfully prepared command line "C:\WINDOWS\system32\cmd.exe" /c winrm quickconfig -quiet -force]LOG]!><time="14:26:03.416-60" date="12-04-2014" component="execmgr" context="" type="1" thread="2572" file="scriptexecution.cpp:650">
    <![LOG[Command line = "C:\WINDOWS\system32\cmd.exe" /c winrm quickconfig -quiet -force, Working Directory = C:\Windows\ccmcache\13\]LOG]!><time="14:26:03.416-60" date="12-04-2014" component="execmgr" context="" type="1" thread="2572" file="scriptexecution.cpp:352">
    <![LOG[Created Process for the passed command line]LOG]!><time="14:26:03.427-60" date="12-04-2014" component="execmgr" context="" type="1" thread="2572" file="scriptexecution.cpp:513">
    <![LOG[Raising event:
    [SMS_CodePage(850), SMS_LocaleID(1053)]
    instance of SoftDistProgramStartedEvent
    {
     AdvertisementId = "S012000E";
     ClientID = "GUID:5b5d231d-116e-47f0-81d0-c93839a752e2";
     CommandLine = "\"C:\\WINDOWS\\system32\\cmd.exe\" /c winrm quickconfig -quiet -force";
     DateTime = "20141204132603.431000+000";
     MachineName = "SCCMTESTVMSTHLM";
     PackageName = "S010005C";
     ProcessID = 1344;
     ProgramName = "WinRM";
     SiteCode = "S01";
     ThreadID = 2572;
     UserContext = "NT instans\\SYSTEM";
     WorkingDirectory = "C:\\Windows\\ccmcache\\13\\";
    };
    ]LOG]!><time="14:26:03.435-60" date="12-04-2014" component="execmgr" context="" type="1" thread="2572" file="event.cpp:715">
    <![LOG[Raised Program Started Event for Ad:S012000E, Package:S010005C, Program: WinRM]LOG]!><time="14:26:03.437-60" date="12-04-2014" component="execmgr" context="" type="1" thread="2572" file="executioncontext.cpp:459">
    <![LOG[Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="S010005C",ProgramID="WinRM", actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l]LOG]!><time="14:26:03.439-60" date="12-04-2014" component="execmgr" context="" type="1" thread="2572" file="event.cpp:405">
    <![LOG[Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="S010005C",ProgramID="WinRM", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l]LOG]!><time="14:26:03.478-60" date="12-04-2014" component="execmgr" context="" type="1" thread="2572" file="event.cpp:405">
    <![LOG[MTC task with id {4BC725EF-6456-4C9E-AEEA-F3639600D829}, changed state from 4 to 5]LOG]!><time="14:26:03.511-60" date="12-04-2014" component="execmgr" context="" type="1" thread="2912" file="execreqmgr.cpp:6288">
    <![LOG[Program exit code 1]LOG]!><time="14:28:40.165-60" date="12-04-2014" component="execmgr" context="" type="1" thread="296" file="scriptexecution.cpp:676">
    <![LOG[Looking for MIF file to get program status]LOG]!><time="14:28:40.177-60" date="12-04-2014" component="execmgr" context="" type="1" thread="296" file="executionstatus.cpp:282">
    <![LOG[Script for Package:S010005C, Program: WinRM failed with exit code 1]LOG]!><time="14:28:40.178-60" date="12-04-2014" component="execmgr" context="" type="3" thread="296" file="executionstatus.cpp:252">

    Monday, December 8, 2014 8:07 AM
  • Hi Anders

    Now i don't know your setup, but if you are configuring your clients to join a domain, it's way easier to configure it in a GPO.

    http://www.grouppolicy.biz/2014/05/enable-winrm-via-group-policy/

    Would this be possible?

    Kind Regards
    Morten Leth

    • Marked as answer by Daniel JiSun Wednesday, December 17, 2014 11:27 AM
    Monday, December 8, 2014 8:33 AM
  • Your package is failing with error code 1, so probably you've configured a recurring schedule for a failed deployment. If that specific command always returns 1, then you should create a small wrapper around the script to return 0 instead of 1 (very dirty).

    Like Morten mentioned, if possible, I would go for a GPO. If not then I would go for compliance settings as described here: http://www.mnscug.org/blogs/sherry-kissinger/299-compliance-setting-to-enable-winrm


    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

    • Marked as answer by Daniel JiSun Wednesday, December 17, 2014 11:27 AM
    Monday, December 8, 2014 9:23 AM
  • Well, I have sorted it out. It was because the bat file was also named winrm which means that the command inside the file ran the bat file over and over again. :)
    Saturday, January 24, 2015 12:42 PM