vcredist
vcredist copied to clipboard
Import-VcMdtApplication: WARNING: Failed to create folder: VcRedists, with: A parameter cannot be found that matches parameter name 'Comments'.
Expected Behavior
On a fresh MDT server, I want to use the VCRedist module to import the VC redists.
Current Behavior
PS C:\Windows\system32> $VcList = Get-VcList | Save-VcRedist -Path "C:\Windows\Temp\VcRedist"
PS C:\Windows\system32> Import-VcMdtApplication -VcList $VcList -MdtPath "C:\MDTBuildLab"
WARNING: Failed to create folder: VcRedists, with: A parameter cannot be found that matches parameter name 'Comments'.
New-Item : A parameter cannot be found that matches parameter name 'Comments'.
At C:\Program Files\WindowsPowerShell\Modules\VcRedist\4.1.484\Private\New-MdtApplicationFolder.ps1:52 char:26
+ New-Item @params | Out-Null
+ ~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [New-Item], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.NewItemCommand
Failure Information (for bugs)
PS C:\Windows\system32> Import-VcMdtApplication -VcList $VcList -MdtPath "C:\MDTBuildLab" -Verbose
VERBOSE: Get MDT details from registry at: HKLM:SOFTWARE\Microsoft\Deployment 4
VERBOSE: Loading MDT module from: C:\Program Files\Microsoft Deployment Toolkit\.
VERBOSE: Loading module from path 'C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1'.
VERBOSE: Importing cmdlet 'Add-MDTPersistentDrive'.
VERBOSE: Importing cmdlet 'Disable-MDTMonitorService'.
VERBOSE: Importing cmdlet 'Enable-MDTMonitorService'.
VERBOSE: Importing cmdlet 'Get-MDTDeploymentShareStatistics'.
VERBOSE: Importing cmdlet 'Get-MDTMonitorData'.
VERBOSE: Importing cmdlet 'Get-MDTOperatingSystemCatalog'.
VERBOSE: Importing cmdlet 'Get-MDTPersistentDrive'.
VERBOSE: Importing cmdlet 'Import-MDTApplication'.
VERBOSE: Importing cmdlet 'Import-MDTDriver'.
VERBOSE: Importing cmdlet 'Import-MDTOperatingSystem'.
VERBOSE: Importing cmdlet 'Import-MDTPackage'.
VERBOSE: Importing cmdlet 'Import-MDTTaskSequence'.
VERBOSE: Importing cmdlet 'New-MDTDatabase'.
VERBOSE: Importing cmdlet 'Remove-MDTMonitorData'.
VERBOSE: Importing cmdlet 'Remove-MDTPersistentDrive'.
VERBOSE: Importing cmdlet 'Restore-MDTPersistentDrive'.
VERBOSE: Importing cmdlet 'Set-MDTMonitorData'.
VERBOSE: Importing cmdlet 'Test-MDTDeploymentShare'.
VERBOSE: Importing cmdlet 'Test-MDTMonitorData'.
VERBOSE: Importing cmdlet 'Update-MDTDatabaseSchema'.
VERBOSE: Importing cmdlet 'Update-MDTDeploymentShare'.
VERBOSE: Importing cmdlet 'Update-MDTLinkedDS'.
VERBOSE: Importing cmdlet 'Update-MDTMedia'.
VERBOSE: Performing the operation "Mapping" on target "C:\MDTBuildLab".
VERBOSE: Found MDT drive: DS001
VERBOSE: Restoring drive 'DS001' with path 'C:\MDTBuildLab'
VERBOSE: Deployment share at 'C:\MDTBuildLab' opened successfully.
VERBOSE: Restoring drive 'DS002' with path 'C:\MDTProduction'
VERBOSE: Deployment share at 'C:\MDTProduction' opened successfully.
VERBOSE: Performing the operation "Create" on target "VcRedists".
WARNING: Failed to create folder: VcRedists, with: A parameter cannot be found that matches parameter name 'Comments'.
New-Item : A parameter cannot be found that matches parameter name 'Comments'.
At C:\Program Files\WindowsPowerShell\Modules\VcRedist\4.1.484\Private\New-MdtApplicationFolder.ps1:52 char:26
+ New-Item @params | Out-Null
+ ~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [New-Item], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.NewItemCommand
If it is not a bug, please remove the rest of this template.
Steps to Reproduce
Just follow the examples from: https://vcredist.com/import-vcmdtapplication/
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
- VcRedist Version: 4.1.484
- PowerShell Version:
Major Minor Build Revision
----- ----- ----- --------
5 1 17763 3770
- Operating System: Windows Server 2019
I compared different environments, and noticed that the command:
Import-VcMdtApplication -VcList $VcList -MdtPath $MdtPath -Verbose
somehow seems to need the DS099 drive. So I created it manually before executing the command:
Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1"
New-PSDrive -Name "DS099" -PSProvider MDTProvider -Root "C:\MDTBuildLab"
and everything starting working once again. I'm not sure why and what I did here. Maybe you know if this is a bug or an error from my side? You can decide if this needs fixing in the code, or if it was a mistake from me, and it can be closed.
I leave it here, if someone else ever searches for this specific error.
The code probably needs some better error checking for multiple MDT drives.
Pretty sure I fixed this one last year. Is this still an issue?
Still the same Issue (?)