Closed Mrbibi38 closed 8 months ago
Also trying to run the tool and am receiving same error as above. "WARNING: Unable to detect expected 'vc_redist.x86.exe.intunewin' file after IntuneWinAppUtil.exe invocation"
I noticed that when I run the WinAppUtil.exe tool manually it is now omitting the .exe. portion of 'vc_redist.x86.exe.intunewin' and only outputting 'vc_redist.x86.intunewin'
Maybe the file isn't being found because of the name change? Just a thought.
I just noticed there's a Breaking Change discussion that addresses this:
Old syntax
$VcList = Get-VcList Save-VcRedist -VcList $VcList -Path C:\Temp\VcRedist Import-VcIntuneApplication -VcList $VcList
New syntax
Get-VcList | Save-VcRedist -Path C:\Temp\VcRedist | Import-VcIntuneApplication
So the command you're looking for should be:
Get-VcList -Export Unsupported | Where-Object { $_.Release -eq "2010" -and $_.Architecture -eq "x86" } | Save-VcRedist -Path C:\Temp\VcRedist | Import-VcIntuneApplication
Also, as an alternative workaround you can try adding a Note Property before the Import-VcIntuneApplication command:
$VcList | Add-Member -NotePropertyMembers @{Path="C:\Temp\VcRedist"} -PassThru
With the commands you're using:
Connect-MSIntuneGraph -TenantID contoso.onmicrosoft.com
$Vc = Get-VcList -Export Unsupported | Where-Object { $_.Release -eq "2010" -and $_.Architecture -eq "x86" }
$VcList = Save-VcRedist -VcList $Vc -Path C:\Temp\VcRedist
$VcList | Add-Member -NotePropertyMembers @{Path="C:\Temp\VcRedist"} -PassThru
Import-VcIntuneApplication -VcList $VcList
@aizascha I have the same issue. I tested in Powershell 5.1 on windows 10 22H2.
$Vc = Get-VcList | Where-Object { $_.Release -eq "2022" }
$VcList = Save-VcRedist -VcList $Vc -Path C:\Temp\VcRedist
$VcList | Add-Member -NotePropertyMembers @{Path="C:\Temp\VcRedist"} -PassThru -force
Import-VcIntuneApplication -VcList $VcList
Add-IntuneWin32App : Cannot validate argument on parameter 'FilePath'. Cannot bind argument to parameter 'Path' because it is an empty string.
At C:\Program Files\WindowsPowerShell\Modules\VcRedist\4.1.495\Public\Import-VcIntuneApplication.ps1:115 char:47
+ $Application = Add-IntuneWin32App @Win32AppArgs
+ ~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Add-IntuneWin32App], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Add-IntuneWin32App
Powershell 7.4.1 tells me:
Import-VcIntuneApplication -VcList $VcList
OperationStopped: C:\Program Files\WindowsPowerShell\Modules\VcRedist\4.1.495\Public\Import-VcIntuneApplication.ps1:26
Line |
26 | throw [System.TypeLoadException]::New($Msg)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| We can't load the IntuneWin32App module on PowerShell Core. Please use PowerShell 5.1.
How can this defect fixed?
Get-VcList | Save-VcRedist -Path C:\Temp\VcRedist | Import-VcIntuneApplication
Object does not have valid Path property. Please ensure that output from Save-VcRedist is passed to this function.
At C:\Program Files\WindowsPowerShell\Modules\VcRedist\4.1.495\Public\Import-VcIntuneApplication.ps1:20 char:13
+ throw [System.Management.Automation.PropertyNotFoundExcep ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : RuntimeException
Expected Behavior
Authenticate to a target tenant, retrieve the list of Visual C++ Redistributables for the 2022 version, download the installers to
C:\Temp\VcRedist
and imports each Redistributable into the target Intune tenant as separate application with the following commands :Like explained in the documentation : https://vcredist.com/import-vcintuneapplication/
Current Behavior
I've got the following path error when executing the
Import-VcIntuneApplication -VcList $VcList
command :Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Context
Get-Module -ListAvailable VcRedist
Maybe I miss understand something or failed a command. If anybody can help ;)