0
使用Get-Content,我开发了我的PowerShell脚本,但后来觉得要使用存储库用于模板。Powershell:如何从URI而不是本地磁盘获取JSON文件内容
$JsonContent = Get-Content $TFileUri | ConvertFrom-Json
错误:
Get-Content : Cannot find drive. A drive with the name 'https' does not exist.
我试图加入-raw参数,管道到ConvertFrom JSON的之前就帮我在其他场合,但它给了我下面的错误:
$JsonContent = Get-Content $TFileUri -Raw | ConvertFrom-Json
Get-Content : A parameter cannot be found that matches parameter name 'Raw.
如何从远程URI获取文件并解决上述问题?