How to troubleshoot 60008

Hi guys,

I have been using PSAppDeployToolkit for some SCCM (MEMCM? call it what you want) deployments in the recent weeks and they mostly worked fine - no issues on the toolkit side anyway. Now I am trying to deploy another application and it is ending up with exit code 60008. The strange thing is that this only happens on some PCs and works just fine on others, so my guess is that there is something wrong with the specific computers.

That exit code apparently means that the toolkit is having issues dot sourcing the main file - I currently have two cases of this issue and confirmed that both have all the required files in ccmcache and the correct folder structure is preserved, as well. They are both W10 1809 and PSVersion on both is 5.1.17763.1007. There is nothing unusual in AppEnforce.log, other than a failure with that exit code. There is no log in C:\Windows\Logs\Software because it does not get that far, due to the character of the failure. Not sure where to move from here, hence this post - could anyone give me some pointers as to what to check in order to remediate this?


Execution policy could be an issue. Incorrectly modified Main.ps1 also causes the script to fail before it even starts logging.

Thanks for your reply. I have not modified the main file though (I guess it would be failing on all clients if that was the issue). As for Execution Policy - as far as I can see, it is one of the very first things Deploy-Application.ps1 does - it sets it to Bypass for the process. Nevertheless, I Set-ExecutionPolicy to Bypass on both computers and am still getting the same exit code 60008.

GPOs can enforce execution policy that you cant change even with elevated permissions.
Also, make sure you change execution policy for scope LocalMachine.
It will warn you if it failed to change it due to GPOs.

Also, what Toolkit version are you using?

We do not enforce execution policy via GPOs (as far as I can see, anyway) and I did change it for LocalMachine. The version is 3.8.2.

As a side note, I was using the Deploy-Application.exe initially but changed it to the following now:

%systemroot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -Command "& { & '.\Deploy-Application.ps1' -DeployMode 'Silent'; Exit $LastExitCode }"

Same result - exit code 60008 :frowning:

Does this also happen with default(not modified) toolkit files?

The only file that is modified is Deploy-Application.ps1 and I have not modified anything in the #region DoNotModify which is the part where it fails. Also, like I mentioned before, this works just fine on most computers but fails on some.

I appreciate you trying to help just don’t see how the last question is relevant under these circumstances?

Because changing the file encoding can also cause issues.

Sure, but wouldn’t it cause issues on all targets rather than just some?

Not necessarily. Depends on the settings of the particular machine. You just said that the same script is failing on some machines yet you are surprised that the same file could also behave differently on some machines?

Anyway, 60008 is tied to loading Main.ps1. Does it point to a specific part of the script? Can you manually dot source the file yourself in a powershell window?

Okay, I tried running the whole thing manually and ended up with the below error. Looks like the computer has Japanese localization and that may be causing the issue?

powershell.exe : C:\Windows\ccmcache\g\Deploy-Application.ps1 : Module [C:\Windows\ccmcache\g\AppDeployToolkit\AppDeployToolkitMain.ps1]
At line:1 char:1
+ powershell.exe -Command "& { & '.\Deploy-Application.ps1' -DeployMode ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (C:\Windows\ccmc...oolkitMain.ps1]:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

 failed to load:
値 "System.Object[]" を型 "System.Xml.XmlDocument" に変換できません。エラー: "行 431、位置 4 にある開始タグ 'RestartPro
mpt_ButtonRestartNow' と終了タグ 'UI_Messages_JA' が対応していません。 行 432、位置 4。"

発生場所 C:\Windows\ccmcache\g\Deploy-Application.ps1:98 文字:81
+ ... yToolkitMain -DisableLogging } Else { . $moduleAppDeployToolkitMain }
+                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
発生場所 行:1 文字:5
+ & { & '.\Deploy-Application.ps1' -DeployMode 'Silent'; Exit  }
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Deploy-Application.ps1

I don’t speak Japanese so no idea what it actually says.

This would have been really helpful in the beginning.

Could you try this: Special Characters in GUI


Yep, that fixed it alright. Thanks!

And sorry, I knew the PCs were in Asia, just did not realize they would have the Japanese mutation applied - we do not allow this in general, Japanese being the exception, which is why it did not even cross my mind.