- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to retrieve the Azure VM deallocated date using PowerShell?
To get the Azure VM deallocated date using PowerShell we can use the below command.
PS C:\> Get-AzVM -VMName Win2k16VM1 -ResourceGroupName TestVMRG -Status
Here it will retrieve the PowerState of the VM.
To retrieve the date when the VM was deallocated, we need to filter out the result.
PS C:\> $vm = Get-AzVM -VMName Win2k16VM1 -ResourceGroupName TestVMRG - Status PS C:\> $vm.Statuses[0].Time
Output
Saturday, June 19, 2021 12:49:16 PM
- Related Articles
- How to retrieve the Azure VM resource group using PowerShell?
- How to retrieve the Azure VM Subscription Name using PowerShell?
- How to retrieve the Azure VM NIC name using PowerShell?
- How to retrieve the Azure VM vNet name using PowerShell?
- How to retrieve the Azure VM nic name using Azure CLI in PowerShell?
- How to retrieve the OS of the Azure VM using Azure CLI in PowerShell?
- How to retrieve the Operating system of the Azure VM using PowerShell?
- How to retrieve the Azure VM RAM and CPU size using PowerShell?
- How to retrieve the Azure VM network security group (NSG) using PowerShell?
- How to retrieve the OS caching setting of Azure VM using Azure\nCLI in PowerShell?
- How to deallocate the Azure VM using Azure CLI in PowerShell?
- How to start the Azure VM using Azure CLI in PowerShell?
- How to stop the Azure VM using Azure CLI in PowerShell?
- How to restart the Azure VM using Azure CLI in PowerShell?
- How to resize the Azure VM using Azure CLI in PowerShell?

Advertisements