I'm having some difficulty using custom scripts as the detection method for an application deployment type. I'm hoping someone can confirm what I'm running into.
Signed powershell scripts do not execute and powershell claims they are signed. After digging into this, I've discovered that any scripts uploaded in the detection method Script Editor window are converted so the newline character is no longer CRLF, but
just LF. Powershell doesn't realize there is a signature block when the file is saved with just LF as the newline character.
The scripts don't live on the client for longer than it takes to execute them. To get around that, I've denied SYSTEM's ability to delete files from c:\windows\ccm\systemtemp. This way I can actually see the file that is being downloaded. It doesn't matter how I upload the file or paste the values into the Script Editor window, CRLF is converted to just LF when the file is downloaded.
I can always do VBScript or change powershell's execution policy, but is there a solution so I can use signed powershell code? My site is running on Server 2012, SQL 2012 SP1 and ConfigMgr 2012 SP1.