Skip to content

Import-VcMdtApplication

SYNOPSIS

Creates Visual C++ Redistributable applications in a Microsoft Deployment Toolkit share.

SYNTAX

Import-VcMdtApplication [-VcList] <PSObject> [[-MdtPath] <String> [[-AppFolder] <String>]
 [-Silent] [-DontHide] [-Force] [[-MdtDrive] <String>] [[-Publisher] <String>] [[-Language] <String>] [-WhatIf]
 [-Confirm] [<CommonParameters>]

DESCRIPTION

Creates an application in a Microsoft Deployment Toolkit share for each Visual C++ Redistributable and includes properties such as target Silent command line, Platform and Uninstall key.

Use Get-VcList and Save-VcRedist to download the Redistributables and create the array for importing into MDT.

Applications will be imported into the MDT Deployment share with the default properties similar to the following:

Location: Applications\VcRedists Name: Visual C++ Redistributable 2019 x86 14.28.29913.0 Comments: Generated by Import-VcMdtApplication Short name: Visual C++ Redistributable for Visual Studio 2019 x86 Version: 14.28.29913.0 Publisher: Microsoft Language: en-US Source directory: .\Applications\Microsoft VcRedist\2019\14.28.29913.0\x86 Quiet install command: .\VC_redist.x86.exe /install /quiet /norestart Working directory: .\Applications\Microsoft VcRedist\2019\14.28.29913.0\x86 Uninstall registry key name: {03d1453c-7d5c-479c-afea-8482f406e036} Hide this application in the Deployment Wizard: Yes

EXAMPLES

EXAMPLE 1

Get-VcList | Save-VcRedist -Path C:\Temp\VcRedist | Import-VcMdtApplication -Path C:\Temp\VcRedist -MdtPath \\server\deployment

Description: Retrieves the list of Visual C++ Redistributables, downloads them to C:\Temp\VcRedist and imports each Redistributable into the MDT deployment share at \server\deployment.

EXAMPLE 2

$VcList = Get-VcList -ExportAll | Save-VcRedist -Path C:\Temp\VcRedist
Import-VcMdtApplication -VcList $VcList -MdtPath \\server\deployment -Bundle

Description: Retrieves the list of supported and unsupported Visual C++ Redistributables in the variable $VcList, downloads them to C:\Temp\VcRedist, imports each Redistributable into the MDT deployment share at \server\deployment and creates an application bundle.

PARAMETERS

-VcList

An array containing details of the Visual C++ Redistributables from Save-VcRedist. Save-VcRedist adds the Path property, that points to the installer executable, to the array exported from Get-VcList.

Type: PSObject
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MdtPath

The local or network path to the MDT deployment share.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AppFolder

Specify a folder within the Applications node that the VcRedists will be imported into. Defaults to 'VcRedists'.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: VcRedists
Accept pipeline input: False
Accept wildcard characters: False

-Silent

Add a completely silent command line install of the VcRedist with no UI. The default install is passive.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DontHide

Specify that the option 'Hide this application in the Deployment Wizard' is not selected.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Force

Force the import and overwrite of an existing application in the MDT deployment share.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-MdtDrive

Optionally specifiy a name for the PSDrive to use when connecting to the MDT deployment share.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: DS001
Accept pipeline input: False
Accept wildcard characters: False

-Publisher

Optionally specify a publisher string to use in the MDT application.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: Microsoft
Accept pipeline input: False
Accept wildcard characters: False

-Language

Optionally specify the language property applied to the MDT application.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: En-US
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

System.Management.Automation.PSObject

NOTES

Author: Aaron Parker Twitter: @stealthpuppy

Import Redistributables into MDT