Microsoft

System Center Configuration Manager Feedback

Suggestion box powered by UserVoice

How can we improve Configuration Manager?

Increase max length of Package/Program Command Line

The max is currently 260 characters for a package/program command line. This means a lot of things that could be a single powershell or cmd.exe line end up needing content for a .ps1 or .cmd file. Please increase the max to 2048-ish characters so more can get done in one line without content.

19 votes
Vote
Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
You have left! (?) (thinking…)
Nash Pherson (MVP) shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

7 comments

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...
  • Anonymous commented  ·   ·  Flag as inappropriate

    I would like to see the character length for filenames/folders of approximately 255 characters increased or removed.

  • Keith Garner commented  ·   ·  Flag as inappropriate

    Oh.. and Daniel, the MMS 2016 idea was placing the entire contents of a PowerShell script into the "Variable" data space of a Configuration Manager Task Sequence. The command line then consists of a Powershell.exe script that reads the contents of the variable and continues execution. This is different User Interface than the addition of packages and command lines there.

    Additionally, cmd.exe has it's OWN limitations with command lines, so be aware of that ( KB830473 ).

  • Keith Garner commented  ·   ·  Flag as inappropriate

    The .NET framework has a built in limitation for MAX path of 260 characters, but that's NOT the same as the command line max. CreateProcess() has no problems running command lines that are the size of a signed int ( 32,768 chars ).

    Is it possible that the SCCM C# (.net) console is truncating the path to some script file in your package and giving you errors? If so then that's not a Max Command Line Length, issue it's a MAX_PATH issue.

    Some repro steps would be super helpful in this case.

  • Jeremy Leirmo commented  ·   ·  Flag as inappropriate

    Mark - Not sure how this would be a Windows limitation. For example, you can copy/paste the following command line into cmd.exe successfully, but it gets trimmed by the Create Program Wizard's UI for Command Line:

    CMD /C (WMIC /namespace:\\root\ccm\invagt path inventoryActionStatus where InventoryActionID="{00000000-0000-0000-0000-000000000001}" DELETE /NOINTERACTIVE) & (WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000001}" /NOINTERACTIVE)

    I assume the wizard just has the maximum characters hard coded.

  • Dustin Hedges commented  ·   ·  Flag as inappropriate

    Would also be nice to expand the input box into a larger text box so you can view the entire command.

  • Nash Pherson (MVP) commented  ·   ·  Flag as inappropriate

    I've got a bunch of 1-line powershell scripts that could very easily not have any content if the max length was something longer.

Feedback and Knowledge Base