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.

Microsoft Deployment Toolkit
Microsoft Deployment Toolkit
A collection of Microsoft tools and documentation for automating desktop and server deployment. Previously known as Microsoft Solution Accelerator for Business Desktop Deployment (BDD).
831 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,381 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Rich Matheisen 45,091 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 40,551 Reputation points Microsoft Vendor
    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.