Skip to content

Instantly share code, notes, and snippets.

View farag2's full-sized avatar
๐Ÿ†
Bringing truth to the weaks

Dmitry Nefedov farag2

๐Ÿ†
Bringing truth to the weaks
View GitHub Profile
@mklement0
mklement0 / ConvertTo-BodyWithEncoding.ps1
Last active September 22, 2024 04:40
PowerShell function that converts the raw body of a web-request response to a string based on the given character encoding.
<#
Prerequisites: Window PowerShell v5.1 and PowerShell (Core), on all supported platforms. (May work in earlier versions.)
License: MIT
Author: Michael Klement <mklement0@gmail.com>
DOWNLOAD and INSTANT DEFINITION OF THE FUNCTION:
irm https://gist.github.com/mklement0/209a9506b8ba32246f95d1cc238d564d/raw/ConvertTo-BodyWithEncoding.ps1 | iex