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獲取文件並解決上述問題?