คิวรีตัวอย่างสินค้าคงคลังของ Power Platform

คิวรีตัวอย่างต่อไปนี้จะเรียกใช้กับตาราง PowerPlatformResources ในตาราง Azure Resource Graph ครอบคลุมการนับจํานวนทรัพยากรและการแจกจ่าย การค้นหาเขตข้อมูล การค้นหาทรัพยากร และการวิเคราะห์การใช้งานตัวเชื่อมต่อ สําหรับภาพรวมของสินค้าคงคลังของ Power Platform โปรดดูที่ คลัง Power Platform สําหรับการอ้างอิงสคีมาและเขตข้อมูล โปรดดูการอ้างอิง Schema สินค้าคงคลังของ 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]"

Tip

คุณสามารถค้นหา ID ของตัวแทนใน URL Copilot Studio เมื่อดูตัวแทน หรือในคอลัมน์ ชื่อของ ตารางสินค้าคงคลัง

นับจำนวนเอเจนต์ตามฮาร์เนส

แสดงการแบ่งย่อยของเอเจนต์ที่สร้างขึ้นด้วย Microsoft Copilot harness, Copilot Chat harness หรือ Standard harness

คุณสามารถดูสายงานของเจ้าหน้าที่ในคอลัมน์ Harness ในศูนย์การจัดการ Power Platform ภายใต้จัดการ>Copilot Studio คอลัมน์ดังกล่าวเป็นคอลัมน์ส่วนติดต่อผู้ใช้เท่านั้น Harness ยังไม่ถูกส่งกลับมาเป็นเมตาดาตาของเอเจนต์ ดังนั้นคิวรีนี้จึงอนุมานค่านี้จากฟิลด์ที่ inventory ส่งกลับมา: properties.isCLIAgent, properties.model และ properties.createdIn properties.harnessเมื่อเขตข้อมูลพร้อมใช้งาน คุณสามารถคิวรีได้โดยตรงแทน สำหรับคำจำกัดความของฟิลด์ โปรดดู สคีมาสินค้าคงคลังของเอเจนต์ใน Microsoft Copilot Studio

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

แสดงรายการเอเจนต์พร้อมชุดเครื่องมือ

ส่งกลับหนึ่งแถวต่อตัวแทนที่มีสายจูงเพื่อให้คุณสามารถค้นหาและดําเนินการกับเจ้าหน้าที่แต่ละรายแทนที่จะนับจํานวนพวกเขาเท่านั้น ยกเลิกการใส่เครื่องหมายความคิดเห็นในบรรทัด where เพื่อส่งกลับเฉพาะตัวแทนที่สร้างขึ้นด้วย Microsoft Copilot harness

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")
//| where harness == "GitHub Copilot"
| project agentName = tostring(properties.displayName),
          agentId = name,
          harness,
          environmentId = tostring(properties.environmentId),
          ownerId = tostring(properties.ownerId),
          createdAt = todatetime(properties.createdAt)
| order by harness asc, createdAt desc

รายการที่สร้างขึ้นใน 24 ชั่วโมงที่ผ่านมา

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

Power Pages คิวรี (ตัวอย่าง)

คิวรีของ Power Pages ใช้ชนิดทรัพยากร microsoft.powerpages/sites สินค้าคงคลัง Power Pages ใช้ได้เฉพาะกับผู้ดูแลระบบส่วนกลาง ผู้ดูแลระบบ Power Platform และผู้ดูแลระบบ Dynamics 365 เท่านั้น

รายการไซต์ Power Pages

คิวรีนี้จะส่งกลับสินค้าคงคลังทั่วทั้งผู้เช่าของไซต์ Power Pages พร้อมสภาพแวดล้อม เจ้าของ วันที่สร้าง และวันที่แก้ไข

PowerPlatformResources
| where type =~ "microsoft.powerpages/sites"
| extend properties = parse_json(properties)
| project siteName = tostring(properties.displayName),
    siteId = name,
    environmentId = tostring(properties.environmentId),
    ownerId = tostring(properties.ownerId),
    createdOn = todatetime(properties.createdAt),
    lastModifiedOn = todatetime(properties.lastModifiedAt)
| order by siteName asc

นับจํานวนไซต์ Power Pages ตามสภาพแวดล้อม

คิวรีนี้แสดงสภาพแวดล้อมที่มีไซต์ Power Pages มากที่สุด

PowerPlatformResources
| where type =~ "microsoft.powerpages/sites"
| extend properties = parse_json(properties)
| extend environmentId = tostring(properties.environmentId)
| summarize siteCount = count() by environmentId
| order by siteCount desc

นับจํานวนไซต์ Power Pages ตามเจ้าของ

คิวรีนี้แสดงเจ้าของที่เกี่ยวข้องกับไซต์ Power Pages จํานวนมากที่สุดเพื่อสนับสนุนการตรวจสอบความเป็นเจ้าของและการวางแผนความต่อเนื่องทางธุรกิจ

PowerPlatformResources
| where type =~ "microsoft.powerpages/sites"
| extend properties = parse_json(properties)
| extend ownerId = tostring(properties.ownerId)
| summarize siteCount = count() by ownerId
| order by siteCount desc

Power Pages ไซต์ที่เปิดใช้งานการเข้าถึงแบบไม่ระบุชื่อ

คิวรีนี้ค้นหาไซต์ที่มีข้อมูลเมตาของสินค้าคงคลังของไซต์ระบุว่าอนุญาตให้เข้าถึงแบบไม่ระบุชื่อ

PowerPlatformResources
| where type =~ "microsoft.powerpages/sites"
| extend properties = parse_json(properties)
| extend anonymousAccessEnabled = tobool(properties.anonymousAccessAllowed)
| where anonymousAccessEnabled == true
| project siteName = tostring(properties.displayName),
    siteId = name,
    environmentId = tostring(properties.environmentId),
    websiteUrl = tostring(properties.siteUrl)
| order by siteName asc

ไซต์ Power Pages ที่สร้างขึ้นล่าสุด

คิวรีนี้จะส่งกลับไซต์ที่สร้างขึ้นในช่วง 30 วันที่ผ่านมา ปรับช่วงเวลาตามความจําเป็น

PowerPlatformResources
| where type =~ "microsoft.powerpages/sites"
| extend properties = parse_json(properties)
| extend createdOn = todatetime(properties.createdAt)
| where createdOn >= ago(30d)
| project siteName = tostring(properties.displayName),
    siteId = name,
    environmentId = tostring(properties.environmentId),
    ownerId = tostring(properties.ownerId),
    createdOn
| order by createdOn desc

Power Pages ไซต์โดยใช้โดเมนแบบกําหนดเอง

คิวรีนี้ส่งกลับไซต์ที่มีเมตาดาต้าคลังของไซต์ซึ่งมี URL ของไซต์แบบกำหนดเอง

PowerPlatformResources
| where type =~ "microsoft.powerpages/sites"
| extend properties = parse_json(properties)
| extend customDomain = tostring(properties.customSiteUrl)
| where isnotempty(customDomain)
| project siteName = tostring(properties.displayName),
    siteId = name,
    environmentId = tostring(properties.environmentId),
    websiteUrl = tostring(properties.siteUrl),
    customDomain
| order by siteName asc

Power Pages กับทรัพยากรอื่น ๆ ของ Power Platform

คิวรีนี้จะสรุปจํานวนทรัพยากรตามชนิดและสภาพแวดล้อมทั่ว Power Platform รวมถึงไซต์ Power Pages ด้วย ไม่รวมเรกคอร์ดที่ไม่มีรหัสสภาพแวดล้อม

PowerPlatformResources
| extend properties = parse_json(properties)
| extend environmentId = tostring(properties.environmentId)
| where isnotempty(environmentId)
| summarize resourceCount = count() by environmentId, type
| order by environmentId asc, resourceCount desc

คิวรีตัวเชื่อมต่อ

คิวรีต่อไปนี้วิเคราะห์การใช้ตัวเชื่อมต่อทั่วทั้งชนิดทรัพยากรที่ครอบคลุมโดย Connector inventory แต่ละคิวรีทํางานกับอาร์เรย์ properties.powerPlatformConnectors ที่ส่งออกโดยแอปแคนวาส แอปที่ขับเคลื่อนด้วยแบบจําลอง แอปที่สร้างขึ้นภายในรันไทม์ที่ Copilot จัดการ โฟลว์ระบบคลาวด์ โฟลว์ตัวแทน โฟลว์ตัวแทนเวิร์กโฟลว์ ตัวแทน Copilot Studio บน Standard harness หรือ Microsoft Copilot harness และตัวแทนที่สร้างขึ้นใน Microsoft 365 Copilot Agent Builder แอปที่สร้างขึ้นภายใน Copilot รันไทม์ที่มีการจัดการให้ใช้microsoft.powerapps/appsชนิด ที่มีmicrosoftAppชนิดย่อย คิวรีไม่รวมแอป App Builder ซึ่งใช้ชนิดเดียวกันแต่ไม่ปล่อยข้อมูลตัวเชื่อมต่อ

ตัวเชื่อมต่อยอดนิยมที่ใช้ทั่วทั้งแหล่งข้อมูล Power Platform

แสดงรายการตัวเชื่อมต่อที่ใช้โดยทรัพยากรที่แตกต่างกันมากที่สุด มีประโยชน์สำหรับการทำความเข้าใจว่าตัวเชื่อมต่อใดถูกนำมาใช้มากที่สุดทั่วทั้งผู้เช่าใช้งาน

PowerPlatformResources
| where type in (
    "microsoft.powerapps/canvasapps",
    "microsoft.powerapps/modeldrivenapps",
    "microsoft.powerapps/apps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| where type != "microsoft.powerapps/apps" or tostring(properties.subType) == "microsoftApp"
| 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.powerapps/apps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| where type != "microsoft.powerapps/apps" or tostring(properties.subType) == "microsoftApp"
| 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.powerapps/apps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| where type != "microsoft.powerapps/apps" or tostring(properties.subType) == "microsoftApp"
| 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.powerapps/apps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| where type != "microsoft.powerapps/apps" or tostring(properties.subType) == "microsoftApp"
| 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