I just created a method in powershell script as -
function Add-Entity() {
[CmdletBinding()]
param(
$TableName,
$PartitionKey,
$RowKey,
[String]$JsonString
)
$entity = New-Object -TypeName Microsoft.WindowsAzure.Storage.Table.DynamicTableEntity -ArgumentList $PartitionKey, $RowKey
$entity.Properties.Add("JsonStringProperty", $JsonString)
$result = $table.CloudTable.Execute([Microsoft.WindowsAzure.Storage.Table.TableOperation]::Insert($entity))
}
and I want to pass this complete jSon string as a parameter -
Add-Entity -TableName $myTableName -PartitionKey "ABC" -RowKey "XYZ" -JsonString {"TO":["[email protected]","[email protected]"],"CC":["[email protected]"],"BCC":[]}
Every time I try to compile, It gives me an error -
Unexpected token ':["abc@xyz".com"' in expression or statement