Skip to content

Instantly share code, notes, and snippets.

@ChrisMagnuson
Created December 18, 2018 03:13
Show Gist options
  • Save ChrisMagnuson/53793af5714c664441f5e24e8be06d4f to your computer and use it in GitHub Desktop.
Save ChrisMagnuson/53793af5714c664441f5e24e8be06d4f to your computer and use it in GitHub Desktop.
ipmo -force Polaris
New-PolarisStaticRoute -FolderPath . -RoutePath /public -EnableDirectoryBrowser $True
New-PolarisRoute -Path "/*" -Method GET -Scriptblock {
$PDFContent = Get-Content -Path "7121_Enhancing_remote_access_in_Windows_10_with_an_automatic_VPN_profile_TCS.pdf" -Raw
$PDFContent = Get-Content -Path "7121_Enhancing_remote_access_in_Windows_10_with_an_automatic_VPN_profile_TCS.pdf"
$PDFContent = Get-Content -Path "7121_Enhancing_remote_access_in_Windows_10_with_an_automatic_VPN_profile_TCS.pdf"
$Response.SetContentType("application/pdf")
$Response.SetHeader("Transfer-Encoding", "chunked")
$Response.send($PDFContent)
}
# 521941
# 978062 -raw
# 977292 -raw:$False
# 1043882
Start-Polaris
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment