Get-ProfilingResults
Get-ProfilingResults Cmdlet 會剖析一或多個指定的 ETL(Windows 事件追蹤)檔案,以尋找應用程式套件的拒絕存取事件,並識別允許套件執行這些存取的功能。 它也會輸出套件所找到之拒絕存取事件的相關信息。
重要
這項功能處於預覽狀態: 某些資訊與發行前版本產品有關,在正式發行前可能會大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
模組名稱: Microsoft.Windows.Win32Isolation.ApplicationCapabilityProfiler
語法
Get-ProfilingResults [[-EtlFilePaths] <string[]>] [-ExeNames <string[]>] [-ManifestPath <string>]
[-RecordsOutputPath <string>] [-SummaryOutputPath <string>] [-PackageNames <string[]>] [-Quiet]
[-ShowNoNameObjectFailures] [-WhatIf] [-Confirm] [<CommonParameters>]
參數
-EtlFilePaths
指定要從中擷取程式代碼剖析結果之 ETL 檔案的路徑陣列。 Get-ProfilingResults 需要輸入 ETL 檔案。 如果未 -EtlFilePaths
提供,Cmdlet 會嘗試停止作用中的追蹤記錄會話,並從中擷取 ETL 檔案。
Type: System.String[]
Parameter Sets: (All)
Aliases: Logs, l
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ExeNames
指定要篩選程式代碼剖析結果的可執行檔名稱陣列。 只會傳回與指定可執行文件相關的結果。
Type: System.String[]
Parameter Sets: (All)
Aliases: e
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ManifestPath
指定要由 Cmdlet 使用已識別功能編輯之應用程式套件指令清單檔的路徑。 如果識別的功能無法歸因於此指令清單的套件,則會針對識別的每個套件產生指令清單複本,包括與該套件相關的功能。
Type: System.String
Parameter Sets: (All)
Aliases: m
Required: False
Position: Named
Default value: <working directory>\<package name>\AppXManfiest-Capabilities.xml
Accept pipeline input: False
Accept wildcard characters: False
-PackageNames
指定要篩選程式代碼剖析結果的封裝名稱數位。 只會傳回與指定封裝相關的結果。
Type: System.String[]
Parameter Sets: (All)
Aliases: p, Packages
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-RecordsOutputPath
指定 CSV 檔案的路徑,以儲存詳細的存取嘗試資訊。 如果未指定,則會使用預設輸出路徑。
Type: System.String
Parameter Sets: (All)
Aliases: r, RecordsOutput, RecordsPath
Required: False
Position: Named
Default value: <working directory>\AccessAttemptRecords.csv
Accept pipeline input: False
Accept wildcard characters: False
-ShowNoNameObjectFailures
指出是否要輸出摘要信息來嘗試存取不明物件。
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-SummaryOutputPath
指定 TXT 檔案的路徑,以儲存分析結果的摘要。 如果未指定,則會使用預設輸出路徑。
Type: System.String
Parameter Sets: (All)
Aliases: s, SummaryPath, SummaryOutput
Required: False
Position: Named
Default value: <working directory>\summary.txt
Accept pipeline input: False
Accept wildcard characters: False
-安靜
表示 Cmdlet 以無訊息模式執行,並隱藏不必要的輸出和提示。
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
顯示執行 Cmdlet 後會發生的情況。 不會執行 Cmdlet。
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Confirm
在執行 Cmdlet 之前,提示使用者進行確認。
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
範例
剖析擷取的追蹤和輸出功能存取資訊
此範例會剖析使用 Start-Profiling/Stop-Profiling 擷取的追蹤,並輸出功能存取資訊。 任何可與所提供的應用程式套件指令清單相符的功能存取資訊,都會自動新增至指令清單。
Get-ProfilingResults -EtlFilePaths C:\Logs\trace.etl -ManifestPath C:\Path\To\MyAppXManifest.xml
尋找及剖析作用中的追蹤記錄會話
此範例會從 Start-Profiling 尋找使用中的追蹤記錄會話、收集追蹤,並加以剖析。 如果追蹤記錄會話目前使用中, 將會呼叫 Stop-Profiling 來嘗試收集可剖析的追蹤。
Get-ProfilingResults -ManifestPath C:\Path\To\MyAppXManifest.xml
剖析多個追蹤
下列範例會剖析多個 ETL 檔案,並輸出功能存取資訊。
Get-ProfilingResults -EtlFilePaths C:\Logs\trace1.etl, C:\Logs\trace2.etl