استعلامات عينة المخزون في Power Platform

تعمل نماذج الاستعلامات التالية مقابل الجدول PowerPlatformResources في Azure Resource Graph. وهي تغطي عد الموارد وتوزيعها، واكتشاف الحقول، والبحث عن الموارد، وتحليل استخدام الموصل. للحصول على نظرة عامة على مخزون Power Platform، راجع مخزون Power Platform. للحصول على المخطط ومرجع الحقل، راجع مرجع مخطط مخزون Power Platform.

كيفية تشغيل هذه الاستعلامات

يمكنك تشغيل أي من هذه الاستعلامات من واجهات Azure Resource Graph. للحصول على إرشادات خطوة بخطوة، راجع أدلة التشغيل السريع التالية:

العد والتوزيع

العدد الإجمالي لجميع الموارد

PowerPlatformResources
| count

إجمالي عدد حسب نوع المورد

PowerPlatformResources
| summarize resourceCount = count() by type
| order by resourceCount

الأعداد حسب البيئة

PowerPlatformResources
| extend properties = parse_json(properties)
| extend environmentId = tostring(properties.environmentId)
| summarize resourceCount = count() by environmentId
| order by resourceCount desc

عدد حسب المنطقة

PowerPlatformResources
| summarize resourceCount = count() by location
| order by resourceCount desc

أفضل المالكين حسب عدد العناصر

PowerPlatformResources
| extend properties = parse_json(properties)
| extend ownerId = tostring(properties.ownerId)
| summarize resourceCount = count() by ownerId
| order by resourceCount desc

عمليات البحث عن الموارد

البحث عن وكيل واحد في المستأجر

PowerPlatformResources
| where type == "microsoft.copilotstudio/agents"
| where name == "[Enter the agent's ID]"

تلميح

يمكنك العثور على معرف العامل في عنوان URL ل Copilot Studio عند عرض العامل، أو في عمود الاسم في جدول المخزون.

عدد العوامل عن طريق التسخير

يظهر توزيع العوامل التي تم إنشاؤها باستخدام تسخير GitHub Copilot أو تسخير Copilot Chat أو تسخير قياسي.

PowerPlatformResources
| where type == "microsoft.copilotstudio/agents"
| extend properties = parse_json(properties)
| extend
    isCLIAgent = tobool(properties.isCLIAgent),
    model = tostring(properties.model),
    createdIn = tostring(properties.createdIn)
| extend harness = case(
    isCLIAgent == true, "GitHub Copilot",
    model =~ "Microsoft 365 Copilot" or createdIn =~ "Microsoft 365 Copilot Agent Builder", "Copilot Chat",
    "Standard")
| summarize agentCount = count() by harness
| order by agentCount desc

العناصر التي تم إنشاؤها خلال ال 24 ساعة الماضية

PowerPlatformResources
| extend properties = parse_json(properties)
| extend createdAt = todatetime(properties.createdAt)
| where createdAt >= ago(24h)

استعلامات الموصل (معاينة)

تحلل الاستعلامات التالية استخدام الموصل عبر أنواع الموارد التي يغطيها مخزون الموصل (معاينة). يعمل كل استعلام على المصفوفة properties.powerPlatformConnectors التي تُصدرها تطبيقات اللوحة، والتطبيقات المستندة إلى النموذج، والتدفقات السحابية، وتدفقات الوكيل، وتدفقات وكيل سير العمل، ووكلاء Copilot Studio.

أهم الموصلات المستخدمة عبر موارد Power Platform

يسرد الموصلات المستخدمة من قبل الموارد الأكثر تميزا. مفيد لفهم الموصلات الأكثر اعتمادًا على مستوى المستأجر.

PowerPlatformResources
| where type in (
    "microsoft.powerapps/canvasapps",
    "microsoft.powerapps/modeldrivenapps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| mv-expand connector = properties.powerPlatformConnectors
| extend connectorId = tostring(connector.connectorId)
| where isnotempty(connectorId)
| summarize ResourceCount = dcount(name) by connectorId
| order by ResourceCount desc
| take 10

توزيع عدد الموصلات لكل مورد

يوضح عدد الموارد التي تستخدم موصلات 0 أو 1 أو 2 أو أكثر. مفيدة لرصد القيم الشاذة في التعقيد.

PowerPlatformResources
| where type in (
    "microsoft.powerapps/canvasapps",
    "microsoft.powerapps/modeldrivenapps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| extend connectorCount = array_length(properties.powerPlatformConnectors)
| summarize ResourceCount = count() by toint(connectorCount)
| order by connectorCount asc

البحث عن كافة الموارد التي تستخدم موصلا معينا

استبدل shared_sharepointonline بالموصل الذي تريد البحث عن. هذا الاستعلام مفيد لتحليل التأثير عندما يكون للموصل مشكلة معروفة أو يتم إهماله أو يتطلب ترخيصا جديدا.

PowerPlatformResources
| where type in (
    "microsoft.powerapps/canvasapps",
    "microsoft.powerapps/modeldrivenapps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| mv-expand connector = properties.powerPlatformConnectors
| where tostring(connector.connectorId) == "shared_sharepointonline"
| project resourceName = tostring(properties.displayName),
          resourceId = name,
          resourceType = type,
          environmentId = tostring(properties.environmentId),
          operationsUsed = connector.operations

استخدام الموصل حسب البيئة

يسرد كل موصل مستخدم في كل بيئة، مع عدد الموارد المميزة التي تستخدمه. هذه القائمة مفيدة لفهم أنماط الاعتماد وإعلام قرارات نهج DLP.

PowerPlatformResources
| where type in (
    "microsoft.powerapps/canvasapps",
    "microsoft.powerapps/modeldrivenapps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| mv-expand connector = properties.powerPlatformConnectors
| extend connectorId = tostring(connector.connectorId)
| where isnotempty(connectorId)
| extend environmentId = tostring(properties.environmentId)
| summarize ResourceCount = dcount(name) by environmentId, connectorId
| order by environmentId asc, ResourceCount desc