Saturday, July 16, 2022
HomeITWinGet - Utility administration - Ideas

WinGet – Utility administration – Ideas

Good morning


Has anyone began critical work on managing their company units by way of this resolution, particularly in deployment and patch administration.


I’m unable to seek out an official Microsoft repository for the administration of functions in GitHub which tells me Microsoft usually are not managing units by way of WinGet and though I’ve discovered work by way of numerous MVPs on this new performance it appears to be restricted to preliminary deployment.


Anyone doing critical work with this?


In my humble unprofessional opinion (hobbyist) this performance would clear up many issues.


I’ve observed that Microsoft.Workplace aka Microsoft 365 Apps for enterprise when deployed by way of this technique installs the x86 software on x64 {hardware}, which isn’t my most well-liked resolution, so if anyone is aware of the place to seek out the suitable switches, I might respect a heads up.


I’ve included my check code (work of one other) with just a few minor modifications.  Its mainly proactive remediation – MEM, prepared however for a few strains.



        This code is the work of Gian Maria and has been printed on the above hyperlink
        This code has been examined to make sure it really works on a improve case and a no improve case
        The code is lacking the precise improve command which is

        winget improve --all --force --accept-package-agreements --accept-source-agreements

        The code will not be proactive remediation prepared, however could be with a few exit statements.


class Software program {

$upgradeResult = winget improve | Out-String

if (!($upgradeResult -match "No put in bundle discovered matching enter standards."))
    Write-Host "There's something to replace" -ForegroundColor Inexperienced

    $strains = $upgradeResult.Cut up([Environment]::NewLine)

    # Discover the road that begins with Title, it incorporates the header
    $fl = 0
    whereas (-not $strains[$fl].StartsWith("Title"))

        # Line $i has the header, we will discover char the place we discover ID and Model
        $idStart = $strains[$fl].IndexOf("Id")
        $versionStart = $strains[$fl].IndexOf("Model")
        $availableStart = $strains[$fl].IndexOf("Out there")
        $sourceStart = $strains[$fl].IndexOf("Supply")

        # Now cycle in actual bundle and break up accordingly
        $upgradeList = @()
        For ($i = $fl + 1; $i -le $strains.Size; $i++) 
            $line = $strains[$i]
            if ($line.Size -gt ($availableStart + 1) -and -not $line.StartsWith('-'))
                 $identify = $line.Substring(0, $idStart).TrimEnd()
                 $id = $line.Substring($idStart, $versionStart - $idStart).TrimEnd()
                 $model = $line.Substring($versionStart, $availableStart - $versionStart).TrimEnd()
                 $out there = $line.Substring($availableStart, $sourceStart - $availableStart).TrimEnd()
                 $software program = [Software]::new()
                 $software program.Title = $identify;
                 $software program.Id = $id;
                 $software program.Model = $model
                 $software program.AvailableVersion = $out there;

                 $upgradeList += $software program

            $upgradeList | Format-Desk

            #Precise improve command - been eliminated as this code must be rewritten for proactive remediation

            #winget improve --all --force --accept-package-agreements --accept-source-agreements



    Write-Host "There may be nothing to improve" -ForegroundColor Yellow



Thankyou for studying and like I stated, I am a hobbyist in a check tenant however eager to be taught.









Please enter your comment!
Please enter your name here

Most Popular

Recent Comments