# TEST PACKAGE INSTALL-AGENT # Set the execution policy to RemoteSigned Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine -Force # The list of software $softwareList = @( @{ Name = "Microsoft Teams"; Id = "Microsoft.Teams" }, @{ Name = "Office 365"; Id = "Microsoft.Office" }, @{ Name = "Outlook"; Id = "Microsoft.Outlook" }, @{ Name = "GitHub Desktop"; Id = "GitHub.GitHubDesktop" }, @{ Name = "Remote Desktop Manager"; Id = "Devolutions.RemoteDesktopManagerFree" } ) # Function to install software using winget function Install-Software { param ( [string]$Name, [string]$Id ) Write-Host "Installing $Name..." winget install --id $Id --silent --accept-package-agreements --accept-source-agreements if ($?) { Write-Host "$Name installed successfully." } else { Write-Host "Failed to install $Name." } } # Loop through the software list and install each one foreach ($software in $softwareList) { Install-Software -Name $software.Name -Id $software.Id } Write-Host "All specified software installations are complete."