简体   繁体   中英

How to store output of script using powershell to azure storage account

please help to store my output result to storage account using powershell in azure automation account such as identify the list of untagged resources, i need to the get the result list as csv into the storage account. Kindly let me know

You can use the below Azure Powershell command to get the output of untagged tags into csv file:

Get-AzResource | Where-Object { $_tags.count -eq 0 } | Export-Csv  -Path "C:\New folder\test.csv"

在此处输入图像描述

Output of command:

在此处输入图像描述

Then you can upload the above csv file using portal:

First click on storage account then click on container then on your container then upload the file

在此处输入图像描述

在此处输入图像描述

References:

Azure CLI(Export azure resource to csv)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM