Posts

Showing posts with the label Azure Resource Graph

PowerShell: Azure Traffic Manager Profiles with Endpoint details

Image
Here is a PowerShell snippet to query Azure Traffic Managers with endpoint details. The script uses PowerShell Az modules so that it is compatible with both Standard PowerShell and PowerShell Core. The script uses the Azure Resource Graph query to get the resource details. $ trafficManagerQuery = " where type =~ 'microsoft.network/trafficmanagerprofiles' " $ trafficeManagers = Search-AzGraph - Query $ trafficManagerQuery $ resultTM = @ () foreach ($ tm in $ trafficeManagers ) {      $ endPoints = $ tm.properties.endpoints      foreach ($ endPoint in $ endPoints )      {          $ edTagetQuery = " where id =~ '{0}' " -f $ endPoint.properties.targetResourceId          $ endTarget = Search-AzGraph - Query $ edTagetQuery          $ customObjProperties = [ ord...

PowerShell and Azure Resource Graph

Image
Introduction On today’s post, I want to discuss a service introduced on the Microsoft Azure platform fairly recently, Azure Resource Graph . Azure Resource Graph service enables the administrators to explore resources in large scale deployment with relative ease across multiple subscriptions and management groups. Azure Resource Graph queries provide the following capabilities. Ability to query resources with complex filtering, grouping, and sorting by resource properties. Ability to iteratively explore resources based on governance requirements and convert the resulting expression into a policy definition. Ability to assess the impact of applying policies in a vast cloud environment. Ability to detail changes made to resource properties (preview). Azure Resource Graph service was announced during 2018’s Microsoft Ignite Conference. The service coupled with cross-platform PowerShell Az module enables the administrators to discover resources much faster compared to...