【发布时间】:2017-03-03 04:43:06
【问题描述】:
我试图通过获取回显字符串作为输入来回显字符串并使用 base64 进行编码。
Write-Host "Hello World" | $b = [System.Convert]::FromBase64String($_) ; [System.Text.Encoding]::UTF8.GetString($b)
但遇到错误,
At line:1 char:28
+ Write-Host "Hello World" | $b = [System.Convert]::FromBase64String($_) ; [System ...
+ ~~
Expressions are only allowed as the first element of a pipeline.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ExpressionsMustBeFirstInPipeline
对此有任何想法
【问题讨论】:
标签: powershell