Skip to content

Import-VcConfigMgrApplication

SYNOPSIS

Creates Visual C++ Redistributable applications in a ConfigMgr site.

SYNTAX

Import-VcConfigMgrApplication [-VcList] <PSObject> [-Path] <String> [-CMPath] <String> [-SMSSiteCode] <String>
 [[-AppFolder] <String>] [-Silent] [-NoCopy] [[-Publisher] <String>] [[-Keyword] <String>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

Creates an application in a Configuration Manager site for each Visual C++ Redistributable and includes setting whether the Redistributable can run on 32-bit or 64-bit Windows and the Uninstall key for detecting whether the Redistributable is installed.

Use Get-VcList and Get-VcRedist to download the Redistributable and create the array of Redistributables for importing into ConfigMgr.

Applications will be imported into the ConfigMgr with the default properties similar to the following:

Location: Applications\VcRedists Name: Visual C++ Redistributable 2019 x86 14.28.29913.0 Administrator comments: Microsoft Visual C++ Redistributable 2019 x86 14.28.29913.0 imported by Import-VcConfigMgrApplication Publisher: Microsoft Software version: 14.28.29913.0 Language: en-US Date published: 18/03/2021 Localized application name: Visual C++ Redistributable 2019 x86 14.28.29913.0 User documentation: https://visualstudio.microsoft.com/vs/support/ Link text: https://www.visualstudio.com/downloads/ Privacy URL: https://go.microsoft.com/fwlink/?LinkId=521839 Keywords: Visual C++ Redistributable

Deployment type: Name: SCRIPT_Visual C++ Redistributable for Visual Studio 2019 Technology: Script Installer Administrator comments: Generated by Import-VcConfigMgrApplication Content location: \configmgr\Applications\VcRedists\2019\14.28.29913.0\x86\ Installation program: VC_redist.x86.exe /install /quiet /norestart Uninstall program: "%ProgramData%\Package Cache{03d1453c-7d5c-479c-afea-8482f406e036}\VC_redist.x86.exe" /uninstall /quiet /noreboot Detection method: (Registry path)

EXAMPLES

EXAMPLE 1

$VcList = Get-VcList
Save-VcRedist -VcList $VcList -Path "C:\Temp\VcRedist"
Import-VcConfigMgrApplication -VcList $VcList -Path "C:\Temp\VcRedist" -CMPath "\\server\share\VcRedist" -SMSSiteCode LAB

Description: Download the supported Visual C++ Redistributables to "C:\Temp\VcRedist", copy them to "\server\share\VcRedist" and import as applications into the ConfigMgr site LAB.

PARAMETERS

-VcList

An array containing details of the Visual C++ Redistributables 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

-Path

A folder containing the downloaded Visual C++ Redistributables.

Type: String
Parameter Sets: (All)
Aliases:

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

-CMPath

Specify a UNC path where the Visual C++ Redistributables will be distributed from

Type: String
Parameter Sets: (All)
Aliases:

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

-SMSSiteCode

Specify the Site Code for ConfigMgr app creation.

Type: String
Parameter Sets: (All)
Aliases:

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

-AppFolder

Import the Visual C++ Redistributables into a sub-folder. Defaults to "VcRedists".

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
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

-NoCopy

Do not copy the Visual C++ Redistributable binaries when importing applications into Configuration Manager.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Publisher

Optionally specify a publisher string to use in the Configuration Manager application.

Type: String
Parameter Sets: (All)
Aliases:

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

-Keyword

Specify a keyword or keywords to add to the Configuration Manager application.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: Visual C++ Redistributable
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 ConfigMgr: