คิวรีตัวอย่างสินค้าคงคลังของ 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 เมื่อดูตัวแทน หรือในคอลัมน์ ชื่อของ ตารางสินค้าคงคลัง

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

แสดงรายละเอียดของเอเจนต์ที่สร้างขึ้นด้วยชุดเครื่องมือ GitHub Copilot, ชุดเครื่องมือ Copilot Chat หรือชุดเครื่องมือมาตรฐาน

คุณสามารถดูสายงานของเจ้าหน้าที่ในคอลัมน์ 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 เพื่อให้ส่งกลับเฉพาะเอเจนต์ที่สร้างด้วยเฟรมเวิร์กทดสอบ GitHub Copilot

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)

คิวรีตัวเชื่อมต่อ (ตัวอย่าง)

คิวรี่ต่อไปนี้วิเคราะห์การใช้ตัวเชื่อมต่อในชนิดทรัพยากรที่ครอบคลุมโดยสินค้าคงคลังของตัวเชื่อมต่อ (ตัวอย่าง) แต่ละคิวรีทำงานกับอาร์เรย์ 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