Digressive / gal-site-utterances

0 stars 0 forks source link

posts/2022/win-package-managers/ #2

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Windows Package Managers and MDT – Mike Galvin - Technical Consultant

A quick guide about Windows Package Managers & MDT

https://gal.vin/posts/2022/win-package-managers/

Digressive commented 1 year ago

test comment

danno73 commented 1 year ago

I find this interesting. I'm curious about Chocolatey / Winget / vs other package managers if there are any. Have looked briefly at Chocolatey. Curious about Choco...and how it will integrate into MDT. I will be following your blog and also possibly trying it out myself. Thanks!

Digressive commented 1 year ago

Scoop is another Windows package manager that I've not used as of yet. https://scoop.sh

lampmanistan commented 1 year ago

Super helpful, thanks for the post! The winget article linked says you can use "Add-AppxPackage -RegisterByFamilyName" but after a few attempts and waiting I still didn't have it. Your ps script worked. I actually used the Run PowerShell Script in MDT (without a batch), but compacted the script and worked like a charm.

$wmiObj = Get-WmiObject -Namespace "root\cimv2\mdm\dmmap" -Class "MDM_EnterpriseModernAppManagement_AppManagement01" while (-not (Get-AppxProvisionedPackage -Online | Where-Object { $_.displayname -eq 'Microsoft.DesktopAppInstaller' -and $_.majorversion -ge 2023 })) { [void]$wmiObj.UpdateScanMethod() Start-Sleep -Seconds 60 }

dudefoxlive commented 1 year ago

This is great but I run LTSC 2021 and that is version 21H2. What would need to be changed to make this script work on that? I do install the MS store as I need some apps from it.

Digressive commented 1 year ago

@dudefoxlive You'll need the latest version of WinGet which is an appx called Microsoft.DesktopAppInstaller. if you install it along with your other MS store apps, you should been able to run winget.exe form the command line.

DansonA-BES commented 9 months ago

What section do you add the scripts etc.? Do you have an image of the task sequence and settings? Thanks

Digressive commented 9 months ago

@DansonA-BES Hi there, sorry for the late reply. I install chocolatey/winget and the apps in the State Restore section of the Task Sequence, where the default "Install Applications" item is.

Chip337 commented 5 months ago

First off thanks for this whole guide, has been amazing.

Second, have you tried installing chocolatey recently when pushing out win11? I had it working with 10, copied the same script over to my new win11 deploy server but it gives a "Could not establish trust relationship for the SSL/TLS secure channel" error when both manually installing or installing via task sequence. Choco lists this in their doc as a trusted root cert issue and gives certs to install, but the AddTrust External CA Root it also wants to install isn't listed anymore.

So far have tried using "run PowerShell script" task sequence and setting it as an application to install, but both end up giving the same error.

Digressive commented 5 months ago

@Chip337 Hey there, I've not tried this recently but thanks for bringing it to my attention. I'll take a look!

Digressive commented 4 months ago

@Chip337 Update on this - I've tested this past week and it's working fine. I'm using Win 11 23H2 with the January updates and the deploy server is Win Serv 2022 21H2 with the Jan updates.

When I've had trusted root cert issues in the past it's been because Windows has been set to block automatic trusted root cert updates either via Group Policy or the registry.

Sorry this boils down to "works on my machine". Hope I've managed to shed some light on it.

Chip337 commented 4 months ago

@Digressive thanks for the update, and no worries. I'll try some more stuff and update if I find anything.