MDT Application install via PS script

Jeremy Runkles 1 Reputation point
2021-06-08T15:53:43.17+00:00

I am trying to install an application with a powershell script using MDT. Below is what I have in the Quiet Install Command field.

powershell -ExecutionPolicy Bypass -noprofile -File \server\folder\scripts\McAfee\AgentInstall.ps1

have tried it with " " around the location, with and without the .exe after the powershell. I keep getting the error code -196608.

I am using Management Console 3.0 version 20H2.

Windows for business Windows Client for IT Pros Devices and deployment Set up, install, or upgrade
Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Rich Matheisen 47,901 Reputation points
    2021-06-08T18:56:44.88+00:00

    That -196608 error converts to hex FFFD0000. I've seen that sometimes returned to mean "path not found".

    If you run the script yourself does it work?

    Is it safe to assume that this is an unattended install? If so, try adding "-noninteractive" to PowerShell's parameters.

    If the AgentInstall.ps1 script from McAfee? You might try asking them how to go about running it from MDT.


  2. AllenLiu-MSFT 49,311 Reputation points Microsoft External Staff
    2021-06-09T09:12:39.417+00:00

    Hi, @Jeremy Runkles
    Thank you for posting in Microsoft Q&A forum.
    We may try to copy the file to the Scripts folder in the DeploymentShare folder, and then run command line:
    powershell.exe -file "%ScriptRoot%\file-name.ps1"
    In the Start in field indicate %ScriptRoot%

    For the reference:
    https://rdr-it.com/en/mdt-running-powershell-script-during-deployment/
    (Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.)


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.