Add src/remote.ps1

This commit is contained in:
2026-01-14 02:03:30 -05:00
parent 01f3587187
commit 515b364066

16
src/remote.ps1 Normal file
View File

@@ -0,0 +1,16 @@
function Get-RemoteText {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string]$Url
)
try {
$resp = Invoke-WebRequest -Uri $Url -UseBasicParsing -ErrorAction Stop
return $resp.Content
}
catch {
Write-LogHybrid "Get-RemoteText failed for ${Url}: $($_.Exception.Message)" Warning UI -LogToEvent
return ""
}
}