Private/OSDSoftware.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
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
71
72
73
74
75
76
77
78
79
Function OSDSoftware-Get-RedirectedUrl {
    [CmdletBinding()]
    Param (
        [Parameter(Mandatory=$true)]
        [String]$URL
    )

    $request = [System.Net.WebRequest]::Create($url)
    $request.AllowAutoRedirect=$false
    $response=$request.GetResponse()

    If ($response.StatusCode -eq "Found")
    {
        $response.GetResponseHeader("Location")
    }
}

function OSDSchrome {
    $Global:OSDInfoUrl = $null
    $Global:OSDDownloadUrl = 'https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise64.msi'
    $Global:OSDPageUrl = $null
    $Global:OSDDownloadFileName = 'googlechromestandaloneenterprise64.msi'
    $Global:OSDDownloadMethod = 'WebClient'
}
function OSDSadk1803 {
    $Global:OSDInfoUrl = 'https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install'
    $Global:OSDDownloadUrl = 'https://go.microsoft.com/fwlink/?linkid=873065'
    $Global:OSDPageUrl = $null
    $Global:OSDDownloadFileName = 'adksetup1803.exe'
    $Global:OSDDownloadMethod = 'WebClient'
}

function OSDSadk1809 {
    $Global:OSDInfoUrl = 'https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install'
    $Global:OSDDownloadUrl = 'https://go.microsoft.com/fwlink/?linkid=2026036'
    $Global:OSDPageUrl = $null
    $Global:OSDDownloadFileName = 'adksetup1809.exe'
    $Global:OSDDownloadMethod = 'WebClient'
}

function OSDSadk1809PE {
    $Global:OSDInfoUrl = 'https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install'
    $Global:OSDDownloadUrl = 'https://go.microsoft.com/fwlink/?linkid=2022233'
    $Global:OSDPageUrl = $null
    $Global:OSDDownloadFileName = 'adkwinpesetup1809.exe'
    $Global:OSDDownloadMethod = 'WebClient'
}
function OSDSmdt32 {
    $Global:OSDInfoUrl = 'https://docs.microsoft.com/en-us/sccm/mdt/'
    $Global:OSDDownloadUrl = 'https://download.microsoft.com/download/3/3/9/339BE62D-B4B8-4956-B58D-73C4685FC492/MicrosoftDeploymentToolkit_x86.msi'
    $Global:OSDPageUrl = $null
    $Global:OSDDownloadFileName = 'MicrosoftDeploymentToolkit_x86.msi'
    $Global:OSDDownloadMethod = 'WebClient'
}
function OSDSmdt64 {
    $Global:OSDInfoUrl = 'https://docs.microsoft.com/en-us/sccm/mdt/'
    $Global:OSDDownloadUrl = 'https://download.microsoft.com/download/3/3/9/339BE62D-B4B8-4956-B58D-73C4685FC492/MicrosoftDeploymentToolkit_x64.msi'
    $Global:OSDPageUrl = $null
    $Global:OSDDownloadFileName = 'MicrosoftDeploymentToolkit_x64.msi'
    $Global:OSDDownloadMethod = 'WebClient'
}

function OSDSmscodeu {
    $Global:OSDInfoUrl = $null
    $Global:OSDDownloadUrl = 'https://aka.ms/win32-x64-user-stable'
    $Global:OSDPageUrl = (Invoke-WebRequest -Uri 'https://code.visualstudio.com/').Links | Where-Object {$_.innerText -like "*version*"}
    $Global:OSDDownloadFileName = "VSCodeUserSetup-x64-$($($OSDPageUrl.innerText).replace('Version ','')).exe"
    $Global:OSDDownloadMethod = 'WebClient'
}

function OSDSmscodes {
    $Global:OSDInfoUrl = $null
    $Global:OSDDownloadUrl = 'https://go.microsoft.com/fwlink/?Linkid=852157'
    $Global:OSDPageUrl = (Invoke-WebRequest -Uri 'https://code.visualstudio.com/').Links | Where-Object {$_.innerText -like "*version*"}
    $Global:OSDDownloadFileName = "VSCodeSetup-x64-$($($OSDPageUrl.innerText).replace('Version ','')).exe"
    $Global:OSDDownloadMethod = 'WebClient'
}