Scripts/install-TEMPLATE.ps1
<#
.SYNOPSIS Wrapper script for installing 7-zip !!! FUNCTIONS LIBRARY SCRIPT FILE MUST BE LOCATED IN THE SAME FOLDER AS THE SCRIPT !!! .DESCRIPTION Provides functionality for downloading and installing packages, including logging and exit codes. .PARAMETER User Mandatory : Generic or customer specific login on dist server. Use quotation marks! .PARAMETER Pass Mandatory : Password for dist server (mandatory). Use quotation marks! .EXAMPLE > Powershell.exe -ExecutionPolicy ByPass -File .\install-SomeApplication.ps1 -User "CUST-Kakbolaget" -Pass "sup3rs3cr3tp@ssw0rd" .NOTES Version: 2.0 Author: Mikael Karlsson Date: 2023-02-22 Version history 2.0 2023-02-22 - Initial release with Functions Library Script (MKa) .LINK https://nordlo.sharepoint.com/:f:/r/sites/city/Leverans/Internt/St%C3%B6dsystem/Dist/Install%20Wrappers?csf=1&web=1&e=OmV9eo #> [CmdletBinding()] Param( [Parameter(Mandatory=$false)] [String]$User, [Parameter(Mandatory=$false)] [string]$Pass, [Parameter(Mandatory=$false)][ValidateSet("Leave","Remove")][string]$PublicDesktopShortcuts="Leave" ) $FunctionsLibrary = "DeployLibNorEvo" $Global:User = $User $Global:Pass = $Pass $Global:PublicDesktopShortcuts = $PublicDesktopShortcuts $Global:ScriptName = Split-Path -Leaf $MyInvocation.MyCommand.Path $null = Install-PackageProvider -Name "NuGet" -Force Remove-Module $FunctionsLibrary -Force -ErrorAction SilentlyContinue Install-Module -Name $FunctionsLibrary -Force Start-NEDeploySession ### Custom Code Starts #################################################################################################################### ### Custom Code Ends #################################################################################################################### Invoke-FinalAction |