简体   繁体   English

如何在powershell的帮助下在excel表中获取所有Azure VM的详细信息以及与之关联的所有标签?

[英]How to get the details of the all Azure VM's with respective all Tag associated with it in excel sheet with the help of powershell?

是否有任何脚本或命令可以在 PowerShell 的帮助下在 Excel 表中获取所有 azure VM 的报告,其中包括与该、RG 和订阅相关的所有标签?

You can implement the Powershell Script by following steps:您可以通过以下步骤实现 Powershell 脚本:

  1. Install az modules in your local machine (Install-Module -Name 'Az' -allowclobber -scope currentuser)在本地计算机上安装az模块(Install-Module -Name 'Az' -allowclobber -scope currentuser)

  2. Connect to your Azure subscription using this cmd (connect-Azaccount).使用此 cmd (connect-Azaccount) 连接到您的 Azure 订阅。

  3. Use Get-AzVm Get-AzVM (Az.Compute) |使用Get-AzVm Get-AzVM (Az.Compute) | Microsoft Docs to get the list of VM under the subscription and assign the output to a variable and by using the for each loop about Foreach - PowerShell | Microsoft Docs获取订阅下的 VM 列表并将输出分配给一个变量,并使用 for each 循环来了解 Foreach - PowerShell | Microsoft Docs iterate the list in the variable and project the output to csv file using the export-csv . Microsoft Docs迭代变量中的列表并使用export-csv将输出投影到 csv 文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Excel vlookup获取所有出现的单元格详细信息? - Excel vlookup to get all occurrence cell details? 如何使用 OleDbDataAdapter 在 c# 中获取所有 excel 工作表数据 - how to get all excel sheet data in c# using OleDbDataAdapter 在SpreadSheetLight中获取Excel工作表中所有列的名称 - Get Names of all Columns in Excel sheet in SpreadSheetLight 如何使用 Excel 工作表中的 powershell 从 Azure 获取虚拟机状态的特定列表 - How to get specifi list of Virtual Machine Status from Azure using powershell from Excel sheet 在Excel中获取从1sheet到另一个工作表的所有记录 - Get all the records from 1sheet to another sheet in excel 如何删除excel表格中的所有数据? - how to delete all the data in a sheet in excel? libreoffice 将所有/特定工作表从 excel 转换为 csv - libreoffice convert all/specific sheet(s) from excel to csv 如何在Excel中每隔5分钟更新一次Excel中的所有数据? - How to import all data in excel and every 5 min excel sheet update? 如何从 Excel 表中获取 PowerShell 中重复值的计数 - How to get the count of repeated values in PowerShell from an Excel Sheet 获取然后将所有行组合与 Excel 工作表中的字符串和整数连接起来 - Get and then join all combinations of rows with strings and integers in Excel sheet
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM