SCCM Detection Method: Error 0x87D00327 (-2016410841) Script is not signed

P M 21 Reputation points
2020-12-16T14:57:09.067+00:00

I discovered a problem in SCCM compliance. When using a PS script for detection, an error (0x87D00327 (-2016410841) Script is not signed) is returned. After closer examination of the problem, I found out:
SCCM creates a temporary ps1 file in the C:\Windows\CCM\SystemTemp.
This file is slightly different from the original. The original contains CR+LF at the end of the line, the SCCM file contains only LF at the end of the line. Powershell cannot detect a signed script file with only LF line ending.

Is it possible to confirm this statement that this is indeed the case? And the error is on the SCCM side because it changes the content?

Examples of files

Original Sample:
48728-originalsample.png

SCCM script sample:
48832-sccmsample.png

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,565 questions
Microsoft Configuration Manager
0 comments No comments
{count} votes

Accepted answer
  1. Jason Sandys 31,311 Reputation points Microsoft Employee
    2020-12-30T02:08:13.967+00:00

    You need to open a support case at this point as something else is going on here. Using the Open button and selecting the file does not (or at least should not) modify the file in any way -- that's the entire point of the open function. I've used this in multiple production environments without issue and have recently tested in my lab as well.


5 additional answers

Sort by: Most helpful
  1. ros\\tech 6 Reputation points
    2024-11-19T17:37:16.4033333+00:00

    we encounter the same issue, two different customer environments. any solution to this?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.