Comments (12)
@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.
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.
@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.
Thank you for the report. Yeah, it seems some issue goes on. Let me check.
from graniresource.
Caused by VSCode Formatter and I did not run test. will be fix in 3.7.9.1.
from graniresource.
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.
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.
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.
@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.
thanks. the article is what I refer when created this resource. I will review again.
from graniresource.
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.
Correct.
from graniresource.
Related Issues (20)
- Error installing .net framework 4.6.1 with cDotNetFramework resource HOT 2
- Cannot get ScheduleTask configuration HOT 3
- Credential Manager Resource HOT 1
- cCredentialManager Resource should change Key from Target Property to Name property HOT 1
- PS 5.1 - Cannot bind argument to parameter 'ScheduledTask' because it is null HOT 4
- Sporadic error after "Test-DscConfiguration" HOT 2
- Principal not taken into account in Register-ScheduledTask in Grani_ScheduleTask.psm1 HOT 3
- Grani_ScheduleTask Set-TargetResource fail on Win2016 HOT 1
- cScheduleTask - The RepetitionInterval and RepetitionDuration Job trigger parameters must be specified together HOT 4
- cScheduledTask - The filename or extension is too long with 2016 Core HOT 12
- cDotNetFramework KB Version does not exist for all Windows product versions HOT 1
- cS3Content should handle region override HOT 1
- Can not handle Script resource execution by OSVersion HOT 2
- Update Grani_Download to support new TLS versions HOT 4
- unable to install .net framework 4.7.2 offline installer
- Symbolic link errors on subsequent applys
- You cannot call a method on a null-valued expression
- cACL cannot be applied to hidden files/folders
- 2008 support?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graniresource.