75 lines
2.1 KiB
PowerShell
75 lines
2.1 KiB
PowerShell
function Update-AlkamiModules {
|
|
<#
|
|
.SYNOPSIS
|
|
This function is a thin shim of how to update the modules. This is not a great way to do this.
|
|
#>
|
|
# TODO ~ Make it better
|
|
[CmdletBinding()]
|
|
[OutputType([void])]
|
|
param(
|
|
[switch]$IncludeDevops,
|
|
[switch]$IncludeInstallers,
|
|
[switch]$IncludeThirdParty,
|
|
[switch]$All
|
|
)
|
|
if ($All) {
|
|
$IncludeDevops = $true
|
|
$IncludeInstallers = $true
|
|
$IncludeThirdParty = $true
|
|
}
|
|
|
|
$knownModuleList = @(
|
|
'Alkami.PowerShell.Common'
|
|
'Alkami.PowerShell.AD'
|
|
'Alkami.PowerShell.Configuration'
|
|
'Alkami.PowerShell.Services'
|
|
'Alkami.PowerShell.Database'
|
|
'Alkami.PowerShell.ServerManagement'
|
|
'Alkami.PowerShell.Choco'
|
|
'Alkami.PowerShell.ServiceFabric'
|
|
'Alkami.PowerShell.IIS'
|
|
)
|
|
if ($IncludeDevops) {
|
|
$knownModuleList += @(
|
|
'Alkami.Ops.Common'
|
|
'Alkami.Ops.Certificates'
|
|
'Alkami.Ops.SecretServer'
|
|
'Alkami.DevOps.Common'
|
|
'Alkami.DevOps.Certificates'
|
|
'Alkami.DevOps.Installation'
|
|
'Alkami.DevOps.Operations'
|
|
'Alkami.DevOps.SqlReports'
|
|
'Alkami.DevOps.Inventory'
|
|
'Alkami.DevOps.Validations'
|
|
)
|
|
}
|
|
if ($IncludeInstallers) {
|
|
$knownModuleList += @(
|
|
'Alkami.Installer.Widget'
|
|
'Alkami.Installer.Provider'
|
|
'Alkami.Installer.WebExtension'
|
|
'Alkami.Installer.WebApplication'
|
|
'Alkami.Installer.Services'
|
|
'Alkami.Installer.WebSite'
|
|
'Alkami.Installer.LegacyUtility'
|
|
'Alkami.Installer.Migration'
|
|
'Alkami.SRE.MigrationUtility'
|
|
)
|
|
}
|
|
if ($IncludeThirdParty) {
|
|
$knownModuleList += @(
|
|
'AWSPowerShell'
|
|
'PSReadLine'
|
|
'powershell-yaml'
|
|
)
|
|
}
|
|
|
|
choco upgrade ($knownModuleList -join ';') -fy
|
|
|
|
Get-Module Alkami* | Remove-Module -Force
|
|
if ($IncludeThirdParty) {
|
|
Get-Module AWS* | Remove-Module -Force
|
|
}
|
|
Get-Module Cole* | Remove-Module -Force
|
|
}
|