Script to check if GAM needs to be updated

325 views
Skip to first unread message

Dan Casmas

unread,
Jun 2, 2021, 1:47:43 PM6/2/21
to GAM for Google Workspace
Does anyone have a Script to check if GAM needs to be updated ?

I am using Jenkins to run gam tasks and would like something to notify people when GAM needs an update.

Gabriel Clifton

unread,
Jun 2, 2021, 2:26:46 PM6/2/21
to google-ap...@googlegroups.com
I do have a Windows batch script that will check the GAM version and update if needed. Not sure what platforms you need and not sure how that can tie into Jenkins.

On Wed, Jun 2, 2021 at 12:47 PM Dan Casmas <dan.c...@funimation.com> wrote:
Does anyone have a Script to check if GAM needs to be updated ?

I am using Jenkins to run gam tasks and would like something to notify people when GAM needs an update.
 
 
  
 
  
Dan Casmas
dan.c...@funimation.com
 

Confidentiality Notice: The information contained in this e-mail and any attachments to it may be legally privileged and include confidential information intended only for the recipient(s) identified above. If you are not one of those intended recipients, you are hereby notified that any dissemination, distribution or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender of that fact by return e-mail and permanently delete the e-mail and any attachments to it immediately. Please do not retain, copy or use this e-mail or its attachments for any purpose, nor disclose all or any part of its contents to any other person. 
</signature>

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/3e9cc7cf-ae6f-4c16-99a1-d9b5f473a952n%40googlegroups.com.


--



Gabriel Clifton | Network Administrator

Fort Stockton ISD | Technology Center
gabriel...@fsisd.net | http://www.fsisd.net
Office (432) 336-4055 ext 2

Fax (432) 336-4050
1204 W. Second St., 
Fort Stockton, TX 79735

CONFIDENTIALITY NOTICE: The contents of this email message and any attachments are intended solely for the addressee(s) and may contain confidential and/or privileged information and may be legally protected from disclosure. If you are not the intended recipient of this message or their agent, or if this message has been addressed to you in error, please immediately alert the sender by reply email and then delete this message and any attachments. If you are not the intended recipient, you are hereby notified that any use, dissemination, copying, or storage of this message or its attachments is strictly prohibited.

"You must always be willing to work without applause."
— Ernest Hemingway

"You just have to find that thing that's special about you that distinguishes you from all the others, and through true talent, hard work, and passion, anything can happen."
— Dr. Dre

Dan Casmas

unread,
Jun 2, 2021, 2:28:24 PM6/2/21
to google-ap...@googlegroups.com
Can you share what you have. I might get some good ideas from it.



 
 
  
 
  
Dan Casmas
dan.c...@funimation.com
 

Confidentiality Notice: The information contained in this e-mail and any attachments to it may be legally privileged and include confidential information intended only for the recipient(s) identified above. If you are not one of those intended recipients, you are hereby notified that any dissemination, distribution or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender of that fact by return e-mail and permanently delete the e-mail and any attachments to it immediately. Please do not retain, copy or use this e-mail or its attachments for any purpose, nor disclose all or any part of its contents to any other person. 
</signature>
You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/vvXysS34DL4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAJXDcnu2BMk0meXkzTk%3D%3D%2B3rrOB1qQN0LX1kMNmv9W4P2NSrtg%40mail.gmail.com.

Gabriel Clifton

unread,
Jun 2, 2021, 2:32:40 PM6/2/21
to google-ap...@googlegroups.com
2 parts
.bat script
for /f "delims=: tokens=2" %%a in ('gam version check ^|find "Current:"') do  call :next1: %%a
for /f "delims=: tokens=2" %%c in ('gam version check ^|find "Latest:"') do call :next2 %%c

if %current% GEQ %latest% goto :eof
if %current% LSS %latest% goto :download
exit /b

:download
powershell.exe -noprofile -File "%~dp0Download GAM-ADV.ps1" %latest% -verb RunAs
msiexec.exe /I %~dp0gamadv-xtd3-%latest%-windows-x86_64.msi /QN
del /f /s /q %~dp0gamadv-xtd3-*-windows-x86_64.msi 2>NUL 1>NUL
exit /b

:next1
set current=%1
set current=%current: =%
exit /b

:next2
set latest=%1
set latest=%latest: =%
exit /b

Powershell script, "Download GAM-ADV.ps1"
param($latest)
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Clear-Host
write-host "`n"

$client = new-object System.Net.WebClient
$client.DownloadFile("https://github.com/taers232c/GAMADV-XTD3/releases/download/v$latest/gamadv-xtd3-$latest-windows-x86_64.msi","$PSScriptRoot\gamadv-xtd3-$latest-windows-x86_64.msi")


Ron

unread,
Jun 2, 2021, 2:37:13 PM6/2/21
to GAM for Google Workspace
The install script can be used to upgrade to the latest version:

gam-install.sh -l

So somehow it's checking if GAM needs to be updated...

Kim Nilsson

unread,
Jun 2, 2021, 2:55:17 PM6/2/21
to GAM for Google Workspace
No, Ron, afaik the -l option it just downloads the latest version and writes over whatever you have, even if it is current.

Ron

unread,
Jun 2, 2021, 3:00:01 PM6/2/21
to GAM for Google Workspace
Right. I thought Dan Casmas might be able to make use of the version checking that the script does... and adopt/tweak the script for his purposes.

Ron

unread,
Jun 2, 2021, 3:00:54 PM6/2/21
to GAM for Google Workspace
adapt, that is. :-)

Ross Scroggs

unread,
Jun 2, 2021, 3:04:22 PM6/2/21
to google-ap...@googlegroups.com
Dan/Others:

Standard GAM:

$ gam version check

GAM 6.04 - https://git.io/gam - pythonsource

Jay Lee <jay...@gmail.com>

Python 3.9.5 64-bit final

google-api-python-client 2.3.0

MacOS High Sierra 10.13.6 x86_64

Path: /Users/admin/Documents/GoogleApps/GAMO

Version Check:

 Current: 6.04

 Latest: 6.04


Advanced GAM:

$ gam version check

GAMADV-XTD3 6.03.29 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource

Ross Scroggs <ross.s...@gmail.com>

Python 3.9.5 64-bit final

google-api-python-client 2.4.0

httplib2 0.19.0

MacOS High Sierra 10.13.6 x86_64

Path: /Users/admin/Documents/GoogleApps/GAM3/gam

Config File: /Library/Application Support/GAM/gam.cfg, Section: RDS.org, customer_id: C03kt1m66, domain: rdschool.org

Version Check:

  Current: 6.03.29

   Latest: 6.03.27


If Current is > Latest there's an update.


Ross


On Wed, Jun 2, 2021 at 12:00 PM Ron <ronald....@emm.org> wrote:
adapt, that is. :-)

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.


--

Gabriel Clifton

unread,
Jun 2, 2021, 4:33:42 PM6/2/21
to GAM for Google Workspace
Interesting Ross, on your printout of GAMADV, your current version is higher than said latest version.
Version Check:
  Current: 6.03.29
   Latest: 6.03.27

Only you can predict the future or past of GAMADV

Ross Scroggs

unread,
Jun 2, 2021, 4:39:44 PM6/2/21
to google-ap...@googlegroups.com
Gabriel,

Copy/paste blunder.

$ gam version check

GAMADV-XTD3 6.03.30 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource

Ross Scroggs <ross.s...@gmail.com>

Python 3.9.5 64-bit final

google-api-python-client 2.4.0

httplib2 0.19.0

MacOS High Sierra 10.13.6 x86_64

Path: /Users/admin/Documents/GoogleApps/GAM3/gam

Config File: /Library/Application Support/GAM/gam.cfg, Section: RDS.org, customer_id: C03kt1m66, domain: rdschool.org

Version Check:

  Current: 6.03.30

   Latest: 6.03.29


The latest on GitUub is 6.03.29, I'm developing 6.03.30.


Ross




--

Gabriel Clifton

unread,
Jun 2, 2021, 4:57:19 PM6/2/21
to google-ap...@googlegroups.com
Just giving the GAMADV master a hard time ;)    8~Þ

Kim Nilsson

unread,
Jun 2, 2021, 5:19:16 PM6/2/21
to Google Apps Manager
You running High Sierra, Ross?
That's not exactly current. (pun intended) 😂

Ross Scroggs

unread,
Jun 2, 2021, 5:31:30 PM6/2/21
to google-ap...@googlegroups.com
Alright/alright everyone, the pressure is too much. What can I do?
I know, I'll read the documentation: https://github.com/taers232c/GAMADV-XTD3/wiki/Version-and-Help
Scroll down to: Print the current and latest versions of Gam and:

$ gam version checkrc

GAMADV-XTD3 6.03.29 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource

Ross Scroggs <ross.s...@gmail.com>

Python 3.9.5 64-bit final

google-api-python-client 2.4.0

httplib2 0.19.0

MacOS High Sierra 10.13.6 x86_64

Path: /Users/admin/Documents/GoogleApps/GAM3/gam

Config File: /Library/Application Support/GAM/gam.cfg, Section: RDS.org, customer_id: C03kt1m66, domain: rdschool.org

Version Check:

  Current: 6.03.29

   Latest: 6.03.30

admin@academic:~/GitHub/GAMADV-XTD3.wiki$ echo $?

1


Return code of 1, you're out of date.


$ gam version checkrc

GAMADV-XTD3 6.03.30 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource

Ross Scroggs <ross.s...@gmail.com>

Python 3.9.5 64-bit final

google-api-python-client 2.4.0

httplib2 0.19.0

MacOS High Sierra 10.13.6 x86_64

Path: /Users/admin/Documents/GoogleApps/GAM3/gam

Config File: /Library/Application Support/GAM/gam.cfg, Section: RDS.org, customer_id: C03kt1m66, domain: rdschool.org

Version Check:

  Current: 6.03.30

   Latest: 6.03.30

admin@academic:~/GitHub/GAMADV-XTD3.wiki$ echo $?

0


Return code of 0, you're up to date.


Ross


On Wed, Jun 2, 2021 at 2:19 PM Kim Nilsson <there.is.no...@gmail.com> wrote:
You running High Sierra, Ross?
That's not exactly current. (pun intended) 😂

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.


--

Kim Nilsson

unread,
Jun 2, 2021, 5:56:43 PM6/2/21
to Google Apps Manager
❤️

Dan Casmas

unread,
Jul 15, 2021, 12:38:22 PM7/15/21
to GAM for Google Workspace
With lots of help I made the following to auto update gam. It works with PS 5.1 and up on windows machines. ( I am not a professional code writer. please test but it works fine for me and my usage) 

Try { 
    If (!(Test-Path C:\Temp)) {
        New-Item -Path C:\Temp -ItemType Directory -ErrorAction SilentlyContinue | Out-Null
    }
}
Catch {
    Write-Warning "This is a windows only script or C:\Temp Directory can't be used / created"
    Break Script
}

$current = $null
$latest = $null
$newCurrent = $null
$resultsarray = @()
$GamCheck = $null
Try {
    Test-Path C:\GAMADV-XTD3\

    $GamCheck = invoke-command -ScriptBlock { C:\GAMADV-XTD3\gam.exe version checkrc }
}
Catch {
    Write-Warning "Go to https://github.com/taers232c/GAMADV-XTD3/releases and download the current GAM and then install GAM in C:\GAMADV-XTD3\"
    
    $filename = 'C:\Temp\Gaminstall.csv'
    
    $resultsarray = [PSCustomObject]@{    
        'Install_GAMADV-XTD3'     = "https://github.com/taers232c/GAMADV-XTD3/releases"
        DirectoryForXTD3NeedsToBe = 'C:\GAMADV-XTD3\'
    }
  
    $resultsarray | Export-Csv $filename -NoTypeInformation | Format-Table text-align=left -AutoSize
    $GamCheck = $null
}
    
If ($GamCheck) {
    $current = $GamCheck.split(":")[19].Trim()
    $latest = $GamCheck.split(":")[21].Trim()
    
    If ($LASTEXITCODE -eq 1) {  
        Try {
            $client = new-object System.Net.WebClient
            $client.DownloadFile("https://github.com/taers232c/GAMADV-XTD3/releases/download/v$latest/gamadv-xtd3-$latest-windows-x86_64.msi", "C:\Temp\gamadv-xtd3-$latest-windows-x86_64.msi")
            Start-Process -Filepath "C:\Temp\gamadv-xtd3-$latest-windows-x86_64.msi" -ArgumentList "/passive" -Wait | Wait-Process -Timeout 60
            Remove-Item "C:\Temp\gamadv-xtd3-$latest-windows-x86_64.msi"
  
            $filename = 'C:\Temp\Gamupgraded.csv'

            $NeedUpGradeCode = $LASTEXITCODE
  
            $GamCheck = $null
            $GamCheck = invoke-command -ScriptBlock { C:\GAMADV-XTD3\gam.exe version checkrc }
            $newCurrent = $GamCheck.split(":")[19].Trim()
    
            $resultsarray = [PSCustomObject]@{    
                CurrentVersion   = $current
                LatestVersion    = $latest
                NeedUpgradeCode  = $NeedUpGradeCode
                Upgraded         = $true
                NewCurrent       = $newCurrent
                AfterUpgradeCode = $LASTEXITCODE
            }
            write-host "Version upgraded $latest" -ForegroundColor Blue
            write-host "$resultsarray" -ForegroundColor Blue
            $resultsarray | Export-Csv $filename -NoTypeInformation | Format-Table text-align=left -AutoSize
        }
        Catch {
            Write-Warning "Problem with site or command. Maybe go to https://github.com/taers232c/GAMADV-XTD3/releases and download the current GAM and then install GAM in C:\GAMADV-XTD3\ again"
            $filename = 'C:\Temp\Gaminstall.csv'
    
            $resultsarray = [PSCustomObject]@{    
                'Install_GAMADV-XTD3'     = "https://github.com/taers232c/GAMADV-XTD3/releases"
                DirectoryForXTD3NeedsToBe = 'C:\GAMADV-XTD3\'
                unknownError              = $true 
                Error                     = $LASTEXITCODE
                Upgraded                  = $False
            }
          
            $resultsarray | Export-Csv $filename -NoTypeInformation | Format-Table text-align=left -AutoSize
        }
    }
    Else {
        $filename = 'C:\Temp\GamCurrent.csv'
        $resultsarray = [PSCustomObject]@{    
            CurrentVersion = $current
            LatestVersion  = $latest
            Error          = $LASTEXITCODE
            Upgraded       = $false
        }
        write-host "Gam version is current $current" -ForegroundColor Green
        write-host "$resultsarray" -ForegroundColor Green

        $resultsarray | Export-Csv $filename -NoTypeInformation | Format-Table text-align=left -AutoSize
    }
}

Return $filename

On Wednesday, June 2, 2021 at 5:56:43 PM UTC-4 there.is.no...@gmail.com wrote:
❤️

Kim Nilsson

unread,
Jul 15, 2021, 6:55:14 PM7/15/21
to Google Apps Manager
gam version checkrc

That should make your code much shorter.

If 0, you are up to date, do nothing. 
If 1, update. 

Kim Nilsson

unread,
Jul 15, 2021, 6:56:40 PM7/15/21
to Google Apps Manager
lol, sorry. I see you are already based on checkrc.

Still, crazy amount of code. 

Dan Casmas

unread,
Jul 15, 2021, 8:26:43 PM7/15/21
to google-ap...@googlegroups.com
I guess I could just go off the 0 or 1 and cut out the checks but I wanted to make it generic enough that anyone could run it.

I am not a pro by any means.


On Thu, Jul 15, 2021 at 6:56 PM Kim Nilsson <there.is.no...@gmail.com> wrote:
lol, sorry. I see you are already based on checkrc.

Still, crazy amount of code. 

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/vvXysS34DL4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAGPzzFvY1wgKWssjdxuRsXij2TaL476h4RoaKJnvkt6Z9XFteQ%40mail.gmail.com.

Gabriel Clifton

unread,
Jul 15, 2021, 8:29:04 PM7/15/21
to GAM for Google Workspace
Crazy amount of code, and when I executed as written, it told me to download GAMADV. When Ross posted the new version, I checked again and same thing. I manually updated to latest and same thing.

Don't worry about being a pro at this! I am nowhere a pro either and I have shared a few sloppy scripts of my own, but trying and sharing helps everyone. 

ภูวดล สาตรา

unread,
Jul 15, 2021, 8:35:58 PM7/15/21
to google-ap...@googlegroups.com

ในวันที่ ศ. 16 ก.ค. 2021 07:26 Dan Casmas <dan.c...@funimation.com> เขียนว่า:
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAFw1GbSA7uh%2BF54hFSfUstTbMfWRA4UohJh3Jn1BZNDiKKHnTw%40mail.gmail.com.

Dan Casmas

unread,
Jul 15, 2021, 9:09:03 PM7/15/21
to google-ap...@googlegroups.com
Do you have it installed in the default dir on a windows machine ?

Sorry it didn’t work then. I have tested with many 

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/vvXysS34DL4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/9917bc5c-282c-4975-9579-7fb4e9126502n%40googlegroups.com.

Gabriel Clifton

unread,
Jul 15, 2021, 9:17:11 PM7/15/21
to google-ap...@googlegroups.com
Yes it is, not sure why it's not working.

Cent frm my fone, I so tipos wth s nrml keybird. U xpect me d0 bttr wth a smallr keybord?

You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAFw1GbTKhHrwoJOKZjMNQUNMkso39OuFjfFwLCvR9nuwSEEgcg%40mail.gmail.com.

Kevin Melillo ✉

unread,
Jul 20, 2021, 8:27:23 AM7/20/21
to GAM for G Suite
I just do it in a much simpler way.  I have a cron job that runs once a week to update GAM and GAMX...  It's in the background, and I know I am dealing with at most a 6 day old version!



--
photo
Kevin Melillo
Electronic Communications Analyst, Information Technology

Phone: 732.465.6609 | Mobile: 732-609-4331

Email: k.me...@ieee.org

445 Hoes Lane Piscataway, NJ 08854

David Downs

unread,
Jul 20, 2021, 12:04:14 PM7/20/21
to GAM for Google Workspace
As posted, it looks like the invoke-command lost an ampersand ('&') possibly.  I tweaked it to use variables and not return the CSV log.

$current = $null
$latest = $null
$newCurrent = $null
$resultsarray = @()
$GamCheck = $null
$myInstall = "$env:SystemDrive\GAMADV-XTD3"
$myTemp = $env:TEMP
If (!$myTemp) {
    Write-Warning "TEMP environment variable not set, using C:\Temp fallback"
    $myTemp = "C:\Temp"
}
Try { 
    If (!(Test-Path "$myTemp")) {
        New-Item -Path $myTemp -ItemType Directory -ErrorAction SilentlyContinue | Out-Null
    }
}
Catch {
    Write-Warning "This is a windows only script or $myTemp Directory can't be used / created"
    Break Script
}

Try {
    If (!(Test-Path "$myInstall\")) {
        Write-Warning "GAMADV-XTD3 not found in $myInstall\"
    }
    $GamCheck = Invoke-Command -ScriptBlock { & "$myInstall\gam.exe" version checkrc }
}
Catch {
    Write-Warning "Go to https://github.com/taers232c/GAMADV-XTD3/releases and download the current GAM and then install GAM in $myInstall\"
    
    $filename = "$myTemp\Gaminstall.csv"
    
    $resultsarray = [PSCustomObject]@{    
        'Install_GAMADV-XTD3'     = "https://github.com/taers232c/GAMADV-XTD3/releases"
        DirectoryForXTD3NeedsToBe = "$myInstall\"
    }
  
    $resultsarray | Export-Csv $filename -NoTypeInformation | Format-Table text-align=left -AutoSize
    $GamCheck = $null
}
    
If ($GamCheck) {
    $current = $GamCheck.split(":")[19].Trim()
    $latest = $GamCheck.split(":")[21].Trim()
    
    If ($LASTEXITCODE -eq 1) {  
        Try {
            $client = new-object System.Net.WebClient
            $client.DownloadFile("https://github.com/taers232c/GAMADV-XTD3/releases/download/v$latest/gamadv-xtd3-$latest-windows-x86_64.msi", "$myTemp\gamadv-xtd3-$latest-windows-x86_64.msi")
            Start-Process -Filepath "$myTemp\gamadv-xtd3-$latest-windows-x86_64.msi" -ArgumentList "/passive" -Wait | Wait-Process -Timeout 60
            Remove-Item "$myTemp\gamadv-xtd3-$latest-windows-x86_64.msi"
  
            $filename = "$myTemp\Gamupgraded.csv"

            $NeedUpGradeCode = $LASTEXITCODE
  
            $GamCheck = $null
            $GamCheck = Invoke-Command -ScriptBlock { & "$myInstall\gam.exe" version checkrc }
            $newCurrent = $GamCheck.split(":")[19].Trim()
    
            $resultsarray = [PSCustomObject]@{    
                CurrentVersion   = $current
                LatestVersion    = $latest
                NeedUpgradeCode  = $NeedUpGradeCode
                Upgraded         = $true
                NewCurrent       = $newCurrent
                AfterUpgradeCode = $LASTEXITCODE
            }
            write-host "Version upgraded $latest" -ForegroundColor Blue
            write-host "$resultsarray" -ForegroundColor Blue
            $resultsarray | Export-Csv $filename -NoTypeInformation | Format-Table text-align=left -AutoSize
        }
        Catch {
            Write-Warning "Problem with site or command. Maybe go to https://github.com/taers232c/GAMADV-XTD3/releases and download the current GAM and then install GAM in $myInstall\ again"
            $filename = "$myTemp\Gaminstall.csv"
    
            $resultsarray = [PSCustomObject]@{    
                'Install_GAMADV-XTD3'     = "https://github.com/taers232c/GAMADV-XTD3/releases"
                DirectoryForXTD3NeedsToBe = "$myInstall\"
                unknownError              = $true 
                Error                     = $LASTEXITCODE
                Upgraded                  = $False
            }
          
            $resultsarray | Export-Csv $filename -NoTypeInformation | Format-Table text-align=left -AutoSize
        }
    }
    Else {
        $filename = "$myTemp\GamCurrent.csv"
        $resultsarray = [PSCustomObject]@{    
            CurrentVersion = $current
            LatestVersion  = $latest
            Error          = $LASTEXITCODE
            Upgraded       = $false
        }
        write-host "Gam version is current $current" -ForegroundColor Green
        write-host "$resultsarray" -ForegroundColor Green

        $resultsarray | Export-Csv $filename -NoTypeInformation | Format-Table text-align=left -AutoSize
    }
}

#Return $filename


Dan Casmas

unread,
Jul 20, 2021, 12:13:25 PM7/20/21
to google-ap...@googlegroups.com
Interesting. I hope it helps someone.

I like the csv report output but each their own. 

I might make it a function with a switch option and borrow from your updates.

Reply all
Reply to author
Forward
0 new messages