Install Windows Update Standalone Installer remotely using DSC

This topic contains 1 reply, has 1 voice, and was last updated by  powershelluser143 6 months, 3 weeks ago.

  • Author
    Posts
  • #65412

    powershelluser143
    Participant

    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-PC

    The SendConfigurationApply function did not succeed.
    + CategoryInfo : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 1
    + PSComputerName : My-PC

  • #65428

    powershelluser143
    Participant

You must be logged in to reply to this topic.