don't update just force the install

This commit is contained in:
2021-09-23 14:27:06 -04:00
parent 79c517d88c
commit e5325088f5
+1 -5
View File
@@ -487,15 +487,11 @@ function Install-PSAteraModule {
$module = Get-Module -ListAvailable -Name PSAtera $module = Get-Module -ListAvailable -Name PSAtera
If ( (-not $module) -and (IsAdmin) ) { If ( (-not $module) -and (IsAdmin) ) {
LogMsg "Installing PSAtera Powershell module" LogMsg "Installing PSAtera Powershell module"
Install-Module -Name PSAtera -MinimumVersion 2.8.5.201 Install-Module -Name PSAtera -MinimumVersion 2.8.5.201 -Force
} }
ElseIf ( (-not $module) -and (-not (IsAdmin)) ) { ElseIf ( (-not $module) -and (-not (IsAdmin)) ) {
LogMsg "The PSAtera module needs to be installed, but the current security context is not sufficient to install it" LogMsg "The PSAtera module needs to be installed, but the current security context is not sufficient to install it"
} }
ElseIf ( ($module) -and (IsAdmin) ) {
LogMsg "Updating PSAtera Powershell module"
Update-Module -Name PSAtera -Force
}
} }
Catch { LogErr $_.Exception.Message } Catch { LogErr $_.Exception.Message }
} }