techthoughts2
10/18/2019 - 10:02 PM

BOM Change of PowerShell file

$content = Get-Content 'Get-TelegramStickerPackInfo.Tests.ps1'
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $true
$path =  [System.Environment]::CurrentDirectory = (Get-Location).Path
$MyPath = "$path\Get-TelegramStickerPackInfo.Tests.ps1"
[System.IO.File]::WriteAllLines($MyPath, $content, $Utf8NoBomEncoding)


$content = Get-Content 'Send-TelegramSticker.Tests.ps1'
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $true
$path =  [System.Environment]::CurrentDirectory = (Get-Location).Path
$MyPath = "$path\Send-TelegramSticker.Tests.ps1"
[System.IO.File]::WriteAllLines($MyPath, $content, $Utf8NoBomEncoding)