Home > OS >  What does this command do ? "az .\-u"
What does this command do ? "az .\-u"

Time:11-21

az .\-u

I accidentally run this command and the cli started some work then I pressed ctrl-c to terminate it but I'm afraid something has been already done. How to check if something changed?

I've checked the cli reference, but couldn't find a similar command.

CodePudding user response:

As there is no such command in Az, even though I entered the same as you, I received an error as shown:

enter image description here

If you want to check your activities for any changes, there are couple of ways:

  1. Check the Log Activity: To check your log activity, use below PowerShell command: (default activity status exists for 90 days)
Get-AzActivityLog -StartTime 2022-11-01T10:30 -EndTime 2022- 11-14T11:30

Note: According to your requirements, you can obtain logs across resource group by applying start time, and end time parameters.

enter image description here

  1. To check for any specific changes held in resources, use below query with "Azcli" command
Search-AzGraph -Query 'resourcechanges | extend changeTime=todatetime(properties.changeAttributes.timestamp) | project changeTime, properties.changeType, properties.targetResourceId, properties.targetResourceType, properties.changes | order by changeTime desc'

Received Output also includes a changetime attribute:

enter image description here

  1. Through Azure portal, Activity logs can also be checked using path: Monitor -> Activity Log

enter image description here

Reference: MSDoc

  • Related