Forum Discussion

oryxway's avatar
oryxway
Iron Contributor
Sep 22, 2023

Powershell script while uploading shows error

I have everything correct. but these characters are appearing here which is causing me to not go to the next step in Intune after detection. This is basically checking 

  • Could you explain a bit more? You're installing 4.8.1 as a Win32 package and the detection script gets malformatted?
    • oryxway's avatar
      oryxway
      Iron Contributor
      Hi Harm,

      Thanks again coming to answer my posting. So, when I copy and paste my Powershell script in the Detection section of Intune to detect the version while pushing an app, I see that it has added 2 or 3 characters in the front, I remember this happened to me before but I do not remember how I solved the problem. Do you see the three characters I have highlighted on the first line before # Custom detection script............................. Those three characters being there is not allowing me to the NEXT screen in order to add the app which has been packaged to be pushed through Intune.
      • You select Use a custom detection script, browse to the .ps1 file (Which, if you open it in Notepad, doesn't have those characters), and after uploading, it does have those characters present. I never saw that before myself.

        Could you add a blank line at the start of the script, save it, and try it again? It seems like an encoding issue...

Resources