Answered by:
access AZURE storage from windows powershell

Question
-
Dear fellows,
i have azure storage blob and need to access the storage from my pc through powershell.
i have already installed Azure storage explorer,
now i need to modify storage using PS, like list them, copy or delete,
how can i access/manipulate the storage using PS.
i have this information
$storageAccount = 'abc'
$storageAccessKey = 'xyz'
$storageContainer = 'container'
k
- Moved by jrv Friday, February 23, 2018 2:35 PM Product specific issue
Friday, February 23, 2018 2:25 PM
Answers
-
So it looks like the module is loaded and all the storage commands are there for use.
~Theo
- Marked as answer by '''HuuM''' Monday, February 26, 2018 5:55 PM
Monday, February 26, 2018 3:52 PM
All replies
-
@HuuM
There are a slew of powershell commands to assist you with this request. To find them all simply type "Get-Command *AzureStorage*" in PoweShell or narrow that down to blob specifically by using "Get-Command *AzureStorageBlog*".
Now once you see those commands you can start working with the blobs like listing all txt files in a specific container:
Get-AzureStorageBlob -Container myContainer -blob *.txt
Hope that helps, marks as answered if so and PowerShell on my friend!
~Theo
- Proposed as answer by AjayKumar-MSFTMicrosoft employee Friday, February 23, 2018 3:39 PM
Friday, February 23, 2018 3:29 PM -
as per snapshot below,
i have installed azureRM,
but he count is still zero
k
Friday, February 23, 2018 8:56 PM -
Use PowerShellGet, so much better and will always grab the latest up to date package.
Find-Package azurerm | install-Package;
That should resolve your issue.
~Theo
Friday, February 23, 2018 11:47 PM -
k
Monday, February 26, 2018 1:53 PM -
Still shows the 0 recoreds after running Find-Package azurerm | install-Package;
k
Monday, February 26, 2018 1:53 PM -
And if you run a "Get-Command -Module AzureRM"; What is the output?
Also do a "Get-Command Get-AzureStor*"; What is the output there as well?
Lastly run "$PSVersionTable"; Show the output of it.
~Theo
- Edited by Theo BrowningMicrosoft employee Monday, February 26, 2018 3:19 PM
Monday, February 26, 2018 3:17 PM -
k
Monday, February 26, 2018 3:34 PM -
k
Monday, February 26, 2018 3:34 PM -
So it looks like the module is loaded and all the storage commands are there for use.
~Theo
- Marked as answer by '''HuuM''' Monday, February 26, 2018 5:55 PM
Monday, February 26, 2018 3:52 PM -
ok, can you please share some use full commands like
how many files are in storage,
how many containers are there
few useful ones.
Regards
k
- Proposed as answer by Theo BrowningMicrosoft employee Monday, February 26, 2018 4:20 PM
- Unproposed as answer by Theo BrowningMicrosoft employee Monday, February 26, 2018 4:20 PM
Monday, February 26, 2018 3:59 PM -
This document will give you everything you need to get started with working with Azure Storage in PowerShell.
https://docs.microsoft.com/en-us/azure/storage/common/storage-powershell-guide-full
- Proposed as answer by Theo BrowningMicrosoft employee Monday, February 26, 2018 4:21 PM
Monday, February 26, 2018 4:21 PM