I am assuming this warning is causing problem.
WARNING: GeoReplicationEnabled property will be deprecated in a future release of Azure PowerShell. The value will be merged into the AccountType property
because when I did this command
Get-AzureWebsite | export-csv -Path "C:\Users\km\Desktop\AzureProject\Hello Pay-As-You-Go-Website.csv"
my CSV file is totally fine
SO the problem I am having is
When I execute this command
Get-AzureStorageAccount | Format-Table -Property StorageAccountName, Location, AccountType, StorageAccountStatus
The result is like this
StorageAccountName Location AccountType
StorageAccountStatus
--------------------- --------- ------------ -------------------- HelloSushi East US Standard_GRS CreatedWARNING: GeoReplicationEnabled property will be deprecated in a future release of Azure PowerShell. The value will be merged into the AccountType property.
and I add this code to move this result to CSV like this
Get-AzureStorageAccount | Format-Table -Property StorageAccountName, Location, AccountType, StorageAccountStatus | export-csv -Path "C:\Users\km\Desktop\AzureProject\Susco Pay-As-You-Go-Storage.csv"
but I checked on CSV.file, it is totally does not make sense. it is not same one.
so ,
I would like to show the result exactly on CSV like when I did this code
Get-AzureStorageAccount | Format-Table -Property StorageAccountName, Location, AccountType, StorageAccountStatus
How can I do that?
Format-Table
is what causes it to all come out in one column. Try this instead:Get-AzureStorageAccount | Select-Object -Property StorageAccountName, Location, AccountType, StorageAccountStatus | Export-Csv -Path "C:\Users\km\Desktop\AzureProject\Hello Pay-As-You-Go-Website.csv"
In general, usingSelect-Object
is preferred if you intend to pass the results to any other commands that manipulate the results. – Booga Roo