csv - 将结果导出到 CSV Azure PowerShell 警告标志

标签 csv powershell azure

我假设此警告引起了问题。

WARNING: GeoReplicationEnabled property will be deprecated in a future release of Azure PowerShell. The value will be merged into the AccountType property

因为当我执行此命令时

Get-AzureWebsite | export-csv -Path "C:\Users\km\Desktop\AzureProject\Hello Pay-As-You-Go-Website.csv"

我的 CSV 文件完全没问题

所以我遇到的问题是

当我执行这个命令时

Get-AzureStorageAccount | Format-Table -Property StorageAccountName, Location, AccountType, StorageAccountStatus

结果是这样的

StorageAccountName Location AccountType
StorageAccountStatus
--------------------- --------- ------------ -------------------- HelloSushi East US Standard_GRS Created

WARNING: GeoReplicationEnabled property will be deprecated in a future release of Azure PowerShell. The value will be merged into the AccountType property.

我添加此代码以将此结果移动到 CSV,如下所示

Get-AzureStorageAccount | Format-Table -Property StorageAccountName, Location, AccountType, StorageAccountStatus | export-csv -Path "C:\Users\km\Desktop\AzureProject\Susco Pay-As-You-Go-Storage.csv"

但是我检查了 CSV.file,它完全没有意义。这不是同一个。

所以,

我想在 CSV 上准确显示结果,就像我执行此代码时一样

Get-AzureStorageAccount | Format-Table -Property StorageAccountName, Location, AccountType, StorageAccountStatus

我怎样才能做到这一点?

最佳答案

尝试 Out-File 而不是 Export-CSV,它提供与控制台完全相同的输出

==

您无法对 Export-Csv 执行格式列表,this link explains it .

关于csv - 将结果导出到 CSV Azure PowerShell 警告标志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34054587/

相关文章:

php - 无法使用 PHP 将 CSV 导入 MySQL

powershell - Powershell FTPWebRequest和EnableSsl = True

azure - Azure Webjob如何将结果返回给webapp?

azure - SSL:如何生成可导出到 MMC 中的 .pfx 的 CSR?

visual-studio-2010 - Azure 项目模板在 Visual Studio 中不可见

C++从函数返回字符串数组

php - 如何使用php将列值作为逗号从mysql数据导入到csv文件

java - 如何使用CSVReader?

powershell - 使用 NuGet 上游源的 Azure DevOps 工件提要安装包失败

powershell - 获取路径根(本地、映射网络驱动器或 UNC)