MDT: Import-MDTApplication : The system cannot find the path specified error


This many not be the only root cause for this error while you run into this error while running this Commandlet, but I found this very easy to come up with this error and difficult to diagnose on the basis of normal method of troubleshooting.

This is MDT 2012 Update 1 and trying to publish applications for Windows 7.

 

So, here is the error:

VERBOSE: Performing operation "import" on Target "Application".
VERBOSE: Beginning application import
VERBOSE: Copying application source files from X:\AutoDesk\Design Review\2013\Sequenced App\Autodesk_DesignReview_2013_UN_01_APPV to \\WNServer1\PHSDeploy$\Applications\Design Review
Import-MDTApplication : The system cannot find the path specified at

+         Import-MDTApplication -path $MDTBaseAppFolder -enable "True" -Name $App.Name - ...
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Import-MDTApplication], DeploymentPointException
    + FullyQualifiedErrorId : Win32Error,Microsoft.BDD.PSSnapIn.ImportApplication

 

All I'm doing is, trying to run Import-MDTApplication with parameters as below:

Import-MDTApplication -path $MDTBaseAppFolder -enable "True" -Name $App.Name -ShortName $App.ShortName -Version $App.Version -Publisher $App.Publisher -Language $App.Language -CommandLIne $App.CommandLIne -WorkingDirectory $App.WorkingDirectory -ApplicationSourcePath $App.AppSourcePath -DestinationFolder $App.DestinationFolder -Verbose

 

Above command is wrapped into a PS1 script file called APPV5Install.ps1, which will take inputs for above parameters from a CSV file taken as a script parameter. This is to simplify task and do multiple entries into MDT.

The CSV file has similar to below data:

 

The issue was, there was a trailing space after 'Destinationfolder' and 'WorkingDirectory' field. After removing the space, I was able to import application successfully.

Comments (0)

Skip to main content