【发布时间】:2018-07-03 13:26:48
【问题描述】:
我正在使用 PowerShell Core v6.0.2,并尝试将字节数组写入文件。这在常规 PowerShell 中运行良好,但在 PowerShell Core 中失败
$jsonstr = Get-Content $inputfilename
$jsonfile = ConvertFrom-Json $jsonstr
$bytes = [Convert]::FromBase64String($jsonfile.data)
$outputfilename = "test.xlsx";
Add-Content -Path $outputfilename -Value $bytes -Encoding Byte
错误:
这是一个错误还是因为二进制排序问题而不能再使用 Byte?
【问题讨论】:
标签: powershell powershell-core