Unattended install of .net framework 4.6.2 using DSC

我只是一个虾纸丫 提交于 2019-12-24 00:25:26

问题


I'm trying to install 4.6.2 on a number of servers in an automated way (no implementation of WSUS or otherwise). My goal was to leverage PowerShell DSC as we are configuring other aspects that way.

However, the resources I've tried (xHotfix from xWindowsUpdate and xPackage from xPSDesiredStateConfiguration) have failed. xHotfix says the downloaded files are invalid (from https://support.microsoft.com/en-us/kb/3151800) and the native Package and xPackage resources require a ProductId...which doesn't seem to be available either.

Has anyone successfully deployed 4.6.2 via PowerShell DSC that can provide some pointers?


回答1:


Borrowing from another SO question (Failure Installing DotNet 4.6.1 via Chocolatey using DSC cChocoPackageInstaller) I opted to develop a custom resource to handle this because I'm not a fan of script resources as they feel brittle...

Both options (using a script or using a script resource) would work as well. I just chose to develop a custom resource for more control.




回答2:


Generally speaking I've found the best fallback to be just using the script resource to do the install. Create a check script that checks the version of .NET and then a script to go ahead and do the install if it's not at 4.6.2 already. I use the same method to deploy .exe based application installers.



来源:https://stackoverflow.com/questions/40616238/unattended-install-of-net-framework-4-6-2-using-dsc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!