This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 558
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split Windows setup scripts, prepare for cleanup and multiple CRI (#3994
- Loading branch information
1 parent
85257e0
commit 7e3249e
Showing
10 changed files
with
930 additions
and
616 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# This is a temporary file to test dot-sourcing functions stored in separate scripts in a zip file | ||
|
||
filter Timestamp {"$(Get-Date -Format o): $_"} | ||
|
||
function | ||
Write-Log($message) | ||
{ | ||
$msg = $message | Timestamp | ||
Write-Output $msg | ||
} | ||
|
||
function DownloadFileOverHttp | ||
{ | ||
Param( | ||
[Parameter(Mandatory=$true)][string] | ||
$Url, | ||
[Parameter(Mandatory=$true)][string] | ||
$DestinationPath | ||
) | ||
$secureProtocols = @() | ||
$insecureProtocols = @([System.Net.SecurityProtocolType]::SystemDefault, [System.Net.SecurityProtocolType]::Ssl3) | ||
|
||
foreach ($protocol in [System.Enum]::GetValues([System.Net.SecurityProtocolType])) | ||
{ | ||
if ($insecureProtocols -notcontains $protocol) | ||
{ | ||
$secureProtocols += $protocol | ||
} | ||
} | ||
[System.Net.ServicePointManager]::SecurityProtocol = $secureProtocols | ||
|
||
Invoke-WebRequest $Url -UseBasicParsing -OutFile $DestinationPath -Verbose | ||
Write-Log "Downloaded file to $DestinationPath" | ||
} |
Oops, something went wrong.