forked from chrisrun/azure-gaming
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.ps1
42 lines (36 loc) · 1.04 KB
/
setup.ps1
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
param (
[string]$network = "",
[string]$admin_username = "",
[string]$admin_password = "",
[switch]$windows_update = $false,
[switch]$manual_install = $false
)
function Get-UtilsScript ($script_name) {
$url = "https://raw.githubusercontent.com/ecalder6/azure-gaming/master/$script_name"
Write-Host "Downloading utils script from $url"
[Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12
$webClient = new-object System.Net.WebClient
$webClient.DownloadFile($url, "C:\$script_name")
}
$script_name = "utils.psm1"
Get-UtilsScript $script_name
Import-Module "C:\$script_name"
if ($windows_update) {
Update-Windows
}
Update-Firewall
Disable-Defender
Disable-ScheduledTasks
Disable-IPv6To4
if ($manual_install) {
Disable-InternetExplorerESC
Edit-VisualEffectsRegistry
}
Add-DisconnectShortcut
Install-Chocolatey
Install-VPN
Join-Network $network
Install-NSSM
Install-NvidiaDriver $manual_install
Set-ScheduleWorkflow $admin_username $admin_password $manual_install
Restart-Computer