If you like this site and you like coffee, why not buy me one. Because I love it

Click to buy coffe
avatar
Untitled

Guest 44 21st Nov, 2022

MARKUP 6.03 KB
                                           
                         Function AppManager {

    [pscustomobject]$AppsBase = @(
        [pscustomobject]@{
            Name     = "7 Zip"
            FileName = "7z2201-x64.exe"
            URL      = "https://www.7-zip.org/a/7z2201-x64.exe"
            Type     = "exe"
        },
        [pscustomobject]@{
            Name     = "Teams x64"
            FileName = "TeamsSetup_c_w_.exe"
            URL      = "https://go.microsoft.com/fwlink/p/?LinkID=2187327&clcid=0x409&culture=en-us&country=US"
            Type     = "exe"
        },
        [pscustomobject]@{
            Name     = "Teams x32"
            FileName = "Teams_windows.exe"
            URL      = "https://teams.microsoft.com/downloads/desktopurl?env=production&plat=windows&arch=&download=true"
            Type     = "exe"
        },
        [pscustomobject]@{
            
            Name     = "JAVA 8u202 x32"
            FileName = "jdk-8u202-windows-i586.exe"
            URL      = "https://repo.huaweicloud.com/java/jdk/8u202-b08/jdk-8u202-windows-i586.exe"
            Type     = "exe"
        },
        [pscustomobject]@{
            
            Name     = "Dell Commnad Update [4.3]"
            FileName = "Dell-Command-Update-Application_8D5MC_WIN_4.3.0_A00_02.EXE"
            URL      = "https://dl.dell.com/FOLDER07582851M/3/Dell-Command-Update-Application_8D5MC_WIN_4.3.0_A00_02.EXE"
            Type     = "exe"
        },
        [pscustomobject]@{
            
            Name     = "Nvidia Experience"
            FileName = "GeForce_Experience_v3.25.1.27.exe"
            URL      = "https://pl.download.nvidia.com/GFE/GFEClient/3.25.1.27/GeForce_Experience_v3.25.1.27.exe"
            Type     = "exe"
        },
        [pscustomobject]@{
            Name     = "MS Removal Tool"
            FileName = "MicrosoftProgram_Install_and_Uninstall.meta.diagcab"
            URL      = "https://download.microsoft.com/download/7/E/9/7E9188C0-2511-4B01-8B4E-0A641EC2F600/MicrosoftProgram_Install_and_Uninstall.meta.diagcab"
            Type     = "exe"
        },
        [pscustomobject]@{
            Name     = "MS Update Tool"
            FileName = "wushowhide.diagcab"
            URL      = "https://download.microsoft.com/download/f/2/2/f22d5fdb-59cd-4275-8c95-1be17bf70b21/wushowhide.diagcab"
            Type     = "exe"
        },
        [pscustomobject]@{
            Name     = "Intel CPU Test"
            FileName = "IPDT_Installer_4.1.7.39_64bit.msi"
            URL      = "https://downloadmirror.intel.com/19792/IPDT_Installer_4.1.7.39_64bit.msi"
            Type     = "exe"
        },
        [pscustomobject]@{
            Name     = "CCM Trace"
            FileName = "CMTrace.exe"
            URL      = "https://drive.google.com/u/0/uc?id=1fo6vH-xK1beXIOgkzUQhfwh4JGZvC2Jg&export=download&confirm=t&uuid=246cd8b4-11d0-47a2-80b6-eb01cf8b317a"
            Type     = "exe"
        },[pscustomobject]@{
            Name     = "Full EventLog View"
            FileName = "FullEventLogView.exe"
            URL      = "https://drive.google.com/uc?export=download&id=1zF6NtltXM6WpzqKucbnV8WV6mbpNsMV2&confirm=t&uuid=e609fd6e-154d-453b-9fea-dcbeb75a71c2"
            Type     = "exe"
        },[pscustomobject]@{
            Name     = "Driver Store"
            FileName = "Rapr.exe"
            URL      = "https://drive.google.com/uc?export=download&id=1MQdsacRQq2z2r4gSbI620z9BWokFDOiu&confirm=t&uuid=08096292-0dcc-4b0a-a497-a37bd3b53ce1"
            Type     = "exe"
        },
        [pscustomobject]@{
            Name     = "Office Removal Tool"
            FileName = "OffScrubC2R.vbs"
            URL      = "https://drive.google.com/uc?export=download&id=1gzIP-u2JLBf5XGoiCTTzMf9HPxwFzFIh&confirm=t&uuid=041e0e64-6d19-42b6-81d0-68f8c6cf29e3&at=ALAFpqxMKDIGm732PEu"
            Type     = "vbs"
        }

    )
    
    do {

        CLS; Write-Host "$("-"*20) App-Manager $("-"*20)" -ForegroundColor Gray
        For ($i = 0; $i -lt $AppsBase.Length; $i++) {
            Write-Host "[$i]" - $AppsBase.Name[$i]
        }

        [string]$PathTEMP = "C:\Temp\Powershell"
        if (! (Test-Path -Path $PathTEMP) ) { New-Item -Path $PathTEMP -ItemType Directory -Force | Out-Null }

        $AppManager = Read-Host "What app need to deploy: "
        $CurrentApp = $AppsBase[$AppManager]
    
        CLS; Write-Warning "$($CurrentApp.Name) downloading..."
    
        $FilePath = $null
        $FilePath = Join-Path $PathTEMP $CurrentApp.FileName
        
        $WebClient = New-Object System.Net.WebClient
        $WebClient.DownloadFile($CurrentApp.URL, $FilePath)
    
        $Intaller = Get-Item -Path $FilePath -ErrorAction SilentlyContinue
        if ($Intaller -and $Intaller.Length -gt 10000) {
            Invoke-Command -ScriptBlock {
                CLS; Write-Warning "$($CurrentApp.Name) installing..."
                cmd.exe /c "$FilePath"
            }
            Write-Host $CurrentApp.Name "- done..." -ForegroundColor Green
        }
        else {
            Write-Host $FilePath "- issue..." -ForegroundColor Red
        }
    
        Remove-Variable WebClient -Force
        #$While = Read-Host 'Install other app [Y][N]'

    }
    while ($while -ne 'N', 0)

}AppManager
                      
                                       
To share this paste please copy this url and send to your friends
RAW Paste Data
Recent Pastes
Ta strona używa plików cookie w celu usprawnienia i ułatwienia dostępu do serwisu oraz prowadzenia danych statystycznych. Dalsze korzystanie z tej witryny oznacza akceptację tego stanu rzeczy.
Wykorzystywanie plików Cookie
Jak wyłączyć cookies?
ROZUMIEM