PSAppDeployToolkit
PSAppDeployToolkit copied to clipboard
PSAPPDEPLOYTOOLKIT-EXECUTEASUSER.VBS blocked by Microsoft Applocker
Describe the bug When Microsoft Applocker is deployed in an Enterprise environment and running Deploy-Application.exe. The script PSAPPDEPLOYTOOLKIT-EXECUTEASUSER.VBS is blocked. This cannot be digitally signed to prevent this. From event viewer: %OSDRIVE%\USERS\USER\PSAPPDEPLOYTOOLKIT\EXECUTEASUSER\PSAPPDEPLOYTOOLKIT-EXECUTEASUSER.VBS was prevented from running.
To Reproduce Steps to reproduce the behavior:
- Download PSADT 3.9.2
- Run it with no changes.
- See error message from applocker on screen and in event viewer.
Screenshots
Toolkit Version: 3.9.2
Powershell Version: 5.1.19041.2364
OS: Windows 10 20H2
This might help https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/issues/741#issuecomment-1416114180 but I think you'll need 3.9.1 or even 3.9.0 to make it work.
In 3.9.2, the PSAPPDEPLOYTOOLKIT-EXECUTEASUSER.VBS file is hardcoded to go into the user profile where AppLocker will not allow to run.
Looks like Defender doesn't like VBS script being launched from a user's profile too. https://discourse.psappdeploytoolkit.com/t/microsoft-defender-suspicious-scheduled-task-launched/4476
We will address this in an upcoming release by moving away from having to use a VBScript in this way.
Duplicate of #582.