I have a INI file on the web.
I want to parse this INI file using Get-IniContent.
However switch -regex -file
doesn't support URL.
Tried to download file and use switch without -file and didn't work:
$content = (Invoke-WebRequest URL).Content
switch -regex $content {
}
Tried to add (?m)
in the regex pattern without success.
Any idea of how can I simulate behavior of -file
switch with multiline string? One other option would be to make the webcontent return a "on memory file". I just doesn't want to create a temp file to use in the switch statement.
Ty