paulomarquesc / AzureRmStorageTable

MIT License
40 stars 27 forks source link

Parameter storageaccount or table #44

Closed WithHolm closed 4 years ago

WithHolm commented 4 years ago

Hi, is it possible to add support for using [Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.AzureStorageTable] or [Microsoft.Azure.Commands.Management.Storage.Models.PSStorageAccount] (get-azstorageaccount and get-azstoragetable)?

paulomarquesc commented 4 years ago

Hi WithHolm,

Not sure in what context you need to use this but you can use both cmdlets you listed to make it work as follows:

C:\Users\pmarques> $StorageAccount = Get-AzStorageAccount -ResourceGroupName support-rg -Name pmcstorage08
C:\Users\pmarques> $table = (Get-AzStorageTable -Name table01 -Context $StorageAccount.Context).CloudTable
C:\Users\pmarques> Get-AzTableRow -Table $table -CustomFilter "RowKey eq '1448'"

value          : 1448-([guid]::NewGuid().tostring())
PartitionKey   : lotsOfRows
RowKey         : 1448
TableTimestamp : 4/10/2019 3:13:57 PM -07:00
Etag           : W/"datetime'2019-04-10T22%3A13%3A57.1658259Z'"

Regards

Paulo

donghexu commented 4 years ago

Reassign to akash, who is the current owner.

Sent from my iPhone

On Dec 10, 2019, at 7:58 AM, Paulo Marques notifications@github.com wrote:



Hi WithHolm,

Not sure in what context you need to use this but you can use both cmdlets you listed to make it work as follows:

C:\Users\pmarques> $StorageAccount = Get-AzStorageAccount -ResourceGroupName support-rg -Name pmcstorage08 C:\Users\pmarques> $table = (Get-AzStorageTable -Name table01 -Context $StorageAccount.Context).CloudTable C:\Users\pmarques> Get-AzTableRow -Table $table -CustomFilter "RowKey eq '1448'"

value : 1448-([guid]::NewGuid().tostring()) PartitionKey : lotsOfRows RowKey : 1448 TableTimestamp : 4/10/2019 3:13:57 PM -07:00 Etag : W/"datetime'2019-04-10T22%3A13%3A57.1658259Z'"

Regards

Paulo

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpaulomarquesc%2FAzureRmStorageTable%2Fissues%2F44%3Femail_source%3Dnotifications%26email_token%3DAJPQXL6B3PTZWSSRPYPHYYDQX64CJA5CNFSM4JE462G2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGPX7JQ%23issuecomment-564101030&data=02%7C01%7CDonghe.Xu%40microsoft.com%7C03c4823a45bc4507b33608d77d89ccae%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637115903112492775&sdata=ZvLMxaomZTPL8ipn%2BAwAalbht0az13iAXL%2BnsvY6h1E%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAJPQXL7HM5BOBFIUSCZLRBTQX64CJANCNFSM4JE462GQ&data=02%7C01%7CDonghe.Xu%40microsoft.com%7C03c4823a45bc4507b33608d77d89ccae%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637115903112502775&sdata=S1HlG2Oorc%2F73fqsXp5g2SCAdyadQvdgSEuG61MFtOI%3D&reserved=0.