简体   繁体   中英

Unattended install of .net framework 4.6.2 using DSC

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?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM