-
-
Notifications
You must be signed in to change notification settings - Fork 634
Expand file tree
/
Copy pathWindows_11.ps1
More file actions
31 lines (26 loc) · 1.43 KB
/
Windows_11.ps1
File metadata and controls
31 lines (26 loc) · 1.43 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
# https://github.com/farag2/Sophia-Script-for-Windows/blob/main/sophia_script_versions.json
$Parameters = @{
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/main/sophia_script_versions.json"
UseBasicParsing = $true
Verbose = $true
}
$Latest_Release_Windows_11_PowerShell_5_1 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_11_PowerShell_5_1
Write-Verbose -Message "Sophia.Script.for.Windows.11.v$Latest_Release_Windows_11_PowerShell_5_1.zip" -Verbose
New-Item -Path "Sophia_Script\Sophia_Script_for_Windows_11_v$Latest_Release_Windows_11_PowerShell_5_1\Binaries" -ItemType Directory -Force
# Copy Windows 11 PS 5.1 version to new folder
Get-ChildItem -Path "src\Sophia_Script_for_Windows_11" -Force | Copy-Item -Destination "Sophia_Script\Sophia_Script_for_Windows_11_v$Latest_Release_Windows_11_PowerShell_5_1" -Recurse -Force
# Add LGPO.exe
$Parameters = @{
Path = "Sophia_Script\LGPO.exe"
Destination = "Sophia_Script\Sophia_Script_for_Windows_11_v$Latest_Release_Windows_11_PowerShell_5_1\Binaries"
Recurse = $true
Force = $true
}
Copy-Item @Parameters
$Parameters = @{
Path = "Sophia_Script\Sophia_Script_for_Windows_11_v$Latest_Release_Windows_11_PowerShell_5_1"
DestinationPath = "Sophia_Script\Sophia.Script.for.Windows.11.v$Latest_Release_Windows_11_PowerShell_5_1.zip"
CompressionLevel = "Fastest"
Force = $true
}
Compress-Archive @Parameters