[英]How to use Powershell to update property of an entity in Azure Table Storage to null?
可以說我已經從表中檢索了一個實體。 我想將屬性之一設置為null。 我該怎么做? 這是我所做的:
$myData.PropertyOne = $null
$myData | Update-AzureStorageTableRow -table $destStorageTable
但是我得到了錯誤:
使用參數“ 1”調用“ Execute”的異常:“對象引用未設置為對象的實例。” 在C:\\ Program Files \\ WindowsPowerShell \\ Modules \\ AzureRmStorageTable \\ 1.0.0.21 \\ AzureRmStorageTableCoreHelper.psm1:629 char:13 + ... return($ table.CloudTable.Execute((invoke-expression“ [Microsoft ... +〜 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ + CategoryInfo:未指定:(:) [],MethodInvocationException + FullyQualifiedErrorId:StorageException
我認為您需要刪除該列-
$myData.psobject.Properties.Remove('PropertyOne')
$myData | Update-AzureStorageTableRow -table $destStorageTable
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.