Giter VIP home page Giter VIP logo

Comments (12)

guitarrapc avatar guitarrapc commented on June 27, 2024 1

@baannee Many thank you for report. I've fixed issue and publish hotfix 3.7.9.1. Would you mind confirm it works on your environment?

  • Release Note

https://github.com/guitarrapc/GraniResource/releases/tag/ver.3.7.9.1

  • PowerShell Gallery

https://www.powershellgallery.com/packages/GraniResource/3.7.9.1

Install-Module -Name GraniResource

from graniresource.

baannee avatar baannee commented on June 27, 2024 1

Hi,
It seems that it's working. But, when I call configuration to install .NET 4.7.1, the following error displays:
PowerShell DSC resource Grani_DotNetFramework failed to execute Set-TargetResource functionality' with error message: Could not find KB from Windows Hotfix list. KB : KB4033344
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
+ PSComputerName : localhost

VERBOSE: [B-IIS-TDSC-01]: LCM: [ End Set ]
The SendConfigurationApply function did not succeed.
+ CategoryInfo : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MI RESULT 1
+ PSComputerName : localhost

VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 9.551 seconds

After reboot, it shows that .NET 4.7.1 is installed.

from graniresource.

rdavisunr avatar rdavisunr commented on June 27, 2024 1

@guitarrapc - I have having the same issue as @baannee on Windows 2012 Server R2. I have also tried with .NET 4.6.2 and .NET 4.7

Here's the verbose output

VERBOSE: [DB]: LCM:  [ Start  Resource ]  [[cDotNetFramework]InstallNETFramework]
VERBOSE: [DB]: LCM:  [ Start  Test     ]  [[cDotNetFramework]InstallNETFramework]
VERBOSE: [DB]:                            [[cDotNetFramework]InstallNETFramework] Importing the module Grani_DotNetFramework in force mode.
VERBOSE: [DB]:                            [[cDotNetFramework]InstallNETFramework] Check KB entry is exists.
VERBOSE: [DB]:                            [[cDotNetFramework]InstallNETFramework] Did not find a KB entry KB3186505.
VERBOSE: [DB]: LCM:  [ End    Test     ]  [[cDotNetFramework]InstallNETFramework]  in 1.1050 seconds.
VERBOSE: [DB]: LCM:  [ Start  Set      ]  [[cDotNetFramework]InstallNETFramework]
VERBOSE: [DB]:                            [[cDotNetFramework]InstallNETFramework] Importing the module Grani_DotNetFramework in force mode.
VERBOSE: [DB]:                            [[cDotNetFramework]InstallNETFramework] Start Installation with process'D:\DOTNET\NDP47-KB3186497-x86-x64-AllOS-ENU.exe', arguments '/q
/x:C:\Windows\Temp\78813ef2-0f95-4553-ac24-1edb16fde487'
VERBOSE: [DB]:                            [[cDotNetFramework]InstallNETFramework] Verifying Exit Code.
VERBOSE: [DB]:                            [[cDotNetFramework]InstallNETFramework] ExitCode : 0. Installation success.Installation completed successfully.
VERBOSE: [DB]:                            [[cDotNetFramework]InstallNETFramework] Start Installation with process 'C:\Windows\Temp\78813ef2-0f95-4553-ac24-1edb16fde487\setup.exe', arguments '/q /x86 /x64 /redist /norestart /log C:\Windows\Temp'
VERBOSE: [DB]:                            [[cDotNetFramework]InstallNETFramework] Verifying Exit Code.
VERBOSE: [DB]:                            [[cDotNetFramework]InstallNETFramework] ExitCode : 0. Installation success. Installation completed successfully.
VERBOSE: [DB]: LCM:  [ End    Set      ]  [[cDotNetFramework]InstallNETFramework]  in 32.2200 seconds.
PowerShell DSC resource Grani_DotNetFramework  failed to execute Set-TargetResource functionality with error message:
Could not find KB from Windows Hotfix list. KB : KB3186505
    + CategoryInfo          : InvalidOperation: (:) [], CimException
    + FullyQualifiedErrorId : ProviderOperationExecutionFailure
    + PSComputerName        : DB

Also, this has worked fine in the past. Maybe a recent Windows Update has caused a change in behavior?

from graniresource.

guitarrapc avatar guitarrapc commented on June 27, 2024

Thank you for the report. Yeah, it seems some issue goes on. Let me check.

from graniresource.

guitarrapc avatar guitarrapc commented on June 27, 2024

Caused by VSCode Formatter and I did not run test. will be fix in 3.7.9.1.

from graniresource.

guitarrapc avatar guitarrapc commented on June 27, 2024

Fixed.

function VerifyInstallation {
    [OutputType([Void])]
    [CmdletBinding()]
    param
    (
        [parameter(Mandatory = $true)]
        [System.String]$KB,

        [parameter(Mandatory = $true)]
        [System.String]$Ensure
    )

    $result = (Get-HotFix | where HotFixId -eq $KB | measure).Count
    if ($Ensure -eq [EnsureType]::Absent.ToString()) {
        
        # Absent
        # should be 0 for success uninstallation
        if ($result -ne 0) {
            throw New-Object System.ArgumentException ($ErrorMessages.VerifyInstallationKBFound -f $KB);
        }
        Write-Verbose ($VerboseMessages.CompleteUninstallation -f $KB);
    }
    elseif ($Ensure -eq [EnsureType]::Present.ToString()) {
        # Present
        # should be 1 for success installation
        if ($result -eq 0) {
            throw New-Object System.NullReferenceException ($ErrorMessages.VerifyInstallationKBNotFound -f $KB);
        }
        Write-Verbose ($VerboseMessages.CompleteInstallation -f $KB);
    }
}

from graniresource.

guitarrapc avatar guitarrapc commented on June 27, 2024

First of all, thank you for using this resource and verbose situation. I was not using the resource currently so that I need to setup VM for Win2012 R2 to fix this issue.

Let me check it. I will check with latest windows update applied instance.

from graniresource.

guitarrapc avatar guitarrapc commented on June 27, 2024

Log and actual behavior shows installation is finished.

After reboot, it shows that .NET 4.7.1 is installed.
ExitCode : 0. Installation success. Installation completed successfully.

So that issue would be it can't detect KB installed without a reboot.

Could not find KB from Windows Hotfix list. KB : KB3186505

from graniresource.

rdavisunr avatar rdavisunr commented on June 27, 2024

@guitarrapc - thanks for the prompt response. Using this article, I was able to determine that my system actually had 4.7.1 already installed (maybe from a Windows update). So, I suppose this would be expected behavior when using your resource to install 4.6.2?

from graniresource.

guitarrapc avatar guitarrapc commented on June 27, 2024

thanks. the article is what I refer when created this resource. I will review again.

from graniresource.

rdavisunr avatar rdavisunr commented on June 27, 2024

I guess the question is, what should happen if a higher version of the framework is already installed?

Since they are in-place updates, maybe the Test should return that it is already in the desired state? Like, when you are trying to install 4.6.2, but 4.7.1 is already there?

from graniresource.

guitarrapc avatar guitarrapc commented on June 27, 2024

Correct.

from graniresource.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.