This section describes the Import-MDTApplication Windows PowerShell cmdlet. Run this cmdlet from a Windows PowerShell console that has the MDT PowerShell snap-in loaded. For more information on how to start a Windows PowerShell console that has the MDT PowerShell snap-in loaded, see Loading the MDT Windows PowerShell Snap-In.

Syntax

Import-MDTApplication [-Path <String>] -Name <String> ‑ApplicationSourcePath <String> -DestinationFolder <String> [-Move] [<CommonParameters>]

–or–

Import-MDTApplication [-Path <String>] -Name <String> ‑NoSource [<CommonParameters>]

–or–

Import-MDTApplication [-Path <String>] -Name <String> ‑Bundle [<CommonParameters>]

Description

This cmdlet imports an application into a deployment share. The following application types can be imported using this cmdlet:

·     Applications that have source files, using the ApplicationSourcePath, DestinationFolder, and Move parameters. The first syntax example illustrates the use of this cmdlet for this type of application.

·     Applications without source files or with source files located on other network shared folders using the NoSource parameter. The second syntax example illustrates the use of this cmdlet for this type of application.

·     Application bundles, which are used to group a set of related applications, using the Bundle parameter. The last syntax example illustrates the use of this cmdlet for this type of application.

Parameters

This subsection provides information about the various parameters that can be used with the Import-MDTApplication cmdlet.

-Path <String>

This parameter specifies the fully qualified path to an existing folder where the application being imported will be placed within the deployment share. If the DestinationFolder parameter is used, then the folder specified in the DestinationFolder parameter is created beneath the folder specified in this parameter. This parameter is used in all syntax usages for this cmdlet.

Note   If this parameter is not provided, the Windows PowerShell working directory must default to the desired location within the deployment share.

 

Parameter

Value

Required?

False

Position?

Named

Default value

Accept pipeline input?        

False

Accept wildcard characters?

False

 

-Name <String>

This parameter specifies the name of the application to be added to the deployments share and must be unique within the deployment share. This parameter is used in all syntax usages for this cmdlet.

 

Parameter

Value

Required?

True

Position?

Named

Default value

Accept pipeline input?        

False

Accept wildcard characters?

False

 

-ApplicationSourcePath <String>

This parameter specifies the fully qualified path to the application source files for the application that will be imported into the deployment share. This parameter is only valid for use in the first syntax example.

 

Parameter

Value

Required?

True

Position?

Named

Default value

Accept pipeline input?        

False

Accept wildcard characters?

False

 

-DestinationFolder <String>

This parameter specifies the folder in the deployment share where the application source files are to be imported. This folder is created beneath the folder specified in the Path parameter. This parameter is only valid for use in the first syntax example.

 

Parameter

Value

Required?

True

Position?

Named

Default value

Accept pipeline input?        

False

Accept wildcard characters?

False

 

-Move [<SwitchParameter>]

This parameter specifies whether the application’s source files should be moved (instead of copied) from the folder where the application’s source files are located, which is specified in the ApplicationSourcePath parameter.

If this parameter is:

·     Specified, then the files are moved and the files in the folder specified in the ApplicationSourcePath parameter are deleted

·     Not specified, then the files are copied and the files in the folder specified in the ApplicationSourcePath parameter are retained

This parameter is only valid for use in the first syntax example.

 

Parameter

Value

Required?

False

Position?

Named

Default value

Accept pipeline input?        

False

Accept wildcard characters?

False

 

-NoSource [<SwitchParameter>]

This parameter specifies that the application being imported is an application that has no source files to be copied. When using this parameter, the application source files are:

·     On a network shared folder, which is specified in the application installation command line or working directory configuration settings

·     Already present in the operating system image

This parameter is only valid for use in the second syntax example.

 

Parameter

Value

Required?

False

Position?

Named

Default value

Accept pipeline input?        

True (ByValue)

Accept wildcard characters?

False

 

-Bundle [<SwitchParameter>]

This parameter specifies that the application being imported is an application that is a bundle of two or more applications. This parameter is only valid for use in the last syntax example.

 

Parameter

Value

Required?

False

Position?

Named

Default value

Accept pipeline input?        

True (ByValue)

Accept wildcard characters?

False

 

<CommonParameters>

This cmdlet supports the following common parameters: Verbose, Debug, ErrorAction, ErrorVariable, OutBuffer, OutVariable, WarningAction, and WarningVariable. For more information, see the topic, “about_CommonParameters,” which you can access by typing the following command, and then pressing ENTER:

Get-Help about_CommonParameters

Outputs

This cmdlet outputs a PSObject type object that references the application just imported.

Example 1

Import-MDTApplication -Path "DS001:\Applications" -Name "Office 2010 Professional Plus 32-bit" ‑ApplicationSourcePath "\\WDG-MDT-01\Source$\Office2010ProPlus\x86" ‑DestinationFolder "Office2010ProPlusx86"

Description

This example imports an application with source files from the network shared folder at \\WDG-MDT-01\Source$\Office2010ProPlus\x86 and copies the source files to DS001:\Applications\Office2010ProPlusx86 within the deployment share. The source files are retained.

Example 2

Import-MDTApplication -Path "DS001:\Applications" -Name "Office 2010 Professional Plus 32-bit" ‑ApplicationSourcePath "\\WDG-MDT-01\Source$\Office2010ProPlus\x86" ‑DestinationFolder "Office2010ProPlusx86" -Move

Description

This example imports an application with source files from the network shared folder at \\WDG-MDT-01\Source$\Office2010ProPlus\x86 and moves the source files to DS001:\Applications\Office2010ProPlusx86 within the deployment share. The source files are removed from the network shared folder at \\WDG-MDT-01\Source$\Office2010ProPlus\x86. The application is named Office 2012 Professional Plus 32-bit.

Example 3

Import-MDTApplication -Path "DS001:\Applications" -Name "Office 2010 Professional Plus 32-bit" ‑NoSource

Description

This example imports an application named Office 2012 Professional Plus 32-bit with no source files.

Example 4

Import-MDTApplication -Path "DS001:\Applications" -Name "Woodgrove Bank Core Applications" ‑Bundle

Description

This example imports an application bundle named Woodgrove Bank Core Applications.

Related Topics

MDT Windows PowerShell Cmdlets