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?
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.
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?
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?
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.