以下のスクリプトを実行して、VSTS powershellタスクの引数セクションを使用してpowershellスクリプトを通して$ fileObjのスクリプトパラメータを渡しています。Azureにテーブルデータをデプロイしようとしていますテーブルストレージ。私は.csvファイル内にテーブルデータを持っており、これらのテーブルエンティティをpowershellスクリプトを使用してデプロイし、空白のテーブルストレージにデプロイしようとしています。以下のスクリプトは、テーブルエンティティをデプロイするのではなく、エラーで失敗します。誰かが私を助けてくれますか? 私はonedrive場所にエラーログ付属している:あなたの言及ログによるとhttps://onedrive.live.com/?authkey=%21AEh2aAOnbmuzq9U&cid=5599285D52BD31F3&id=5599285D52BD31F3%21900&parId=root&action=locatepowershellスクリプトを使用してテーブルをAzureテーブルストレージにデプロイ中のエラー
foreach($fo in $fileObj){
Write-Host $fo.filepath
$csv = Import-CSV $fo.filepath
$cArray=$fo.Cols.split(",")
foreach($line in $csv)
{
Write-Host "$($line.partitionkey), $($line.rowKey)"
$entity = New-Object -TypeName Microsoft.WindowsAzure.Storage.Table.DynamicTableEntity -ArgumentList $line.partitionkey, $line.rowKey
foreach($c in $cArray){
Write-Host "$c,$($line.$c)"
$entity.Properties.Add($c,$line.$c)
}
$result = $table.CloudTable.Execute([Microsoft.WindowsAzure.Storage.Table.TableOperation]::Insert($entity))
}
}
$subscriptionName = ""
$resourceGroupName = ""
$storageAccountName = ""
$location = ""
# Get the storage key for the storage account
$StorageAccountKey = ""
# Get a storage context
$ctx = New-AzureStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $storageAccountKey
誰もが私の問題への対応いただけますか? – PRAVEEN