Hi all I have the code which I am running locally to update the software using PowerShell
Configuration V5Install
{
node "$env:COMPUTERNAME"
{
LocalConfigurationManager
{
RebootNodeIfNeeded = $true
}
Package InstallPowerShell_V5
{
Name = "PowerShellV5"
Path = "$($env:WINDIR)\system32\wusa.exe"
ProductId = ""
Arguments = "C:\Windows\Temp\W2K12-KB3134759-x64.msu /quiet"
}
}
}
V5Install -OutputPath $env:SystemDrive:\DSCconfig -Verbose
Set-DscLocalConfigurationManager -ComputerName $env:COMPUTERNAME -Path $env:SystemDrive\DSCconfig
Start-DscConfiguration -ComputerName $env:COMPUTERNAME -Path $env:SystemDrive:\DSCconfig -Wait -Force
I got an error message as follows
PowerShell DSC resource MSFT_PackageResource failed to execute Set-TargetResource functionality with error message: The return code 3 was not expected. Configuration is likely not correct + CategoryInfo : InvalidOperation: (:) [], CimException + FullyQualifiedErrorId : ProviderOperationExecutionFailure + PSComputerName : My-PCThe SendConfigurationApply function did not succeed.
+ CategoryInfo : NotSpecified: (root/Microsoft/…gurationManager:String) , CimException
+ FullyQualifiedErrorId : MI RESULT 1
+ PSComputerName : My-PC