-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.txt
More file actions
70 lines (61 loc) · 2.24 KB
/
test.txt
File metadata and controls
70 lines (61 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Type: PowerShell Script
# Date: 06/02/2023
# Author: Aristos Vasiliou
# Purpose: install software
############################################################
$StartTime = Get-Date
function install_powershell {
Invoke-Expression "& { $(Invoke-RestMethod https://aka.ms/install-powershell.ps1) } -UseMSI -Quiet"
}
function install_winget {
Write-Host installing winget
$progressPreference = 'silentlyContinue'
Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx
Invoke-WebRequest -Uri https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx -OutFile Microsoft.UI.Xaml.2.8.x64.appx
Add-AppxPackage Microsoft.VCLibs.x64.14.00.Desktop.appx
Add-AppxPackage Microsoft.UI.Xaml.2.8.x64.appx
Add-AppxPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
}
function install_7zip {
Write-Host installing 7zip
winget install 7zip.7zip --accept-source-agreements
}
function install_vlc {
Write-Host installing vlc
winget install VideoLAN.VLC
Write-Host removing vlc shortcut from desktop
Remove-Item -Path 'C:\Users\Public\Desktop\VLC media player.lnk'
}
function install_notepad {
Write-Host installing notepad++
winget install Notepad++.Notepad++
}
function install_greenshot {
Write-Host installing greenshot
winget install Greenshot.Greenshot
foreach ($process in 'msedge') {
Write-Host waiting for $process
Do {
Start-Sleep 1
}
Until (Get-Process -ErrorAction SilentlyContinue -Name $process)
}
foreach ($process in 'msedge') {
Write-Host stopping $process
Stop-Process -Name $process -Force
}
}
function install_microsoft_office {
Write-Host installing microsoft office
winget install Microsoft.Office
}
install_powershell
install_winget
install_7zip
install_vlc
install_notepad
install_greenshot
install_microsoft_office
$RunTime = New-TimeSpan -Start $StartTime -End (Get-Date)
Write-Host Script execution took $RunTime.Minutes minutes and $RunTime.Seconds seconds -ForegroundColor Green