使用Azure CLI命令查找VM的最后日期
我有一个带有不同资源组和不同虚拟机的Azure帐户。我想知道如何确定哪些未使用。例如,使用Azure CLI命令,检查用户启动或使用虚拟机的最后日期。
请帮助我...
I have an account with Azure with different Resource Group and different virtual machine. I would like to know how I can determine which ones are unused. For example check the last date where the virtual machine was started or used by the user using azure cli command.
Please help me out with this...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最简单的可能是看VM的功能。
首先列出所有VM,然后运行一个查询,您可以在其中滤除与特定资源组属于特定资源组的查询:
有关查询的更多信息,请在Microsoft Docs页面上查找“ Jmespath-Query”。希望这会有所帮助。
Easiest would probably to look at the powerstate of a vm.
First list all the vm's and then run a query where you filter out those that are deallocated and belong to a specific resource group:
For more information on the queries look up 'JMESPath-query' on the Microsoft docs page. Hopefully this helps.
目前未使用,因此无法使用CLI来做到这一点。
我们可以使用PowerShell获取此信息。随后。
参考
Currently, there is no way to do that using cli.
We can get this information using PowerShell. which follows.
References