你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
New-AzOperationalInsightsWindowsPerformanceCounterDataSource
为运行 Windows 操作系统的连接计算机添加 Windows 性能计数器数据源。
语法
New-AzOperationalInsightsWindowsPerformanceCounterDataSource
[-ResourceGroupName] <String>
[-WorkspaceName] <String>
[-Name] <String>
[-ObjectName] <String>
[-CounterName] <String>
[-InstanceName <String>]
[-IntervalSeconds <Int32>]
[-UseLegacyCollector]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzOperationalInsightsWindowsPerformanceCounterDataSource
[-Workspace] <PSWorkspace>
[-Name] <String>
[-ObjectName] <String>
[-CounterName] <String>
[-InstanceName <String>]
[-IntervalSeconds <Int32>]
[-UseLegacyCollector]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
New-AzOperationalInsightsWindowsPerformanceCounterDataSource cmdlet 为运行 Windows 操作系统的连接计算机添加了 Windows 性能计数器数据源。
示例
示例 1
New-AzOperationalInsightsWindowsPerformanceCounterDataSource -ResourceGroupName testrg -WorkspaceName LogAnalyticsWorkspace -Name performance1 -ObjectName object -CounterName counters
Name : performance1
ResourceGroupName : testrg
WorkspaceName : LogAnalyticsWorkspace
ResourceId : /subscriptions/xxxx-xxxx-xxxx-xxxx-xxxx/resourceGroups/testrg/providers/Microsoft.OperationalInsights/workspaces/LogAnalyticsWorkspace/datasources/performance1
Kind : WindowsPerformanceCounter
Properties : {"objectName":"object","instanceName":"*","intervalSeconds":15,"counterName":"counters","collectorType":"Default"}
为运行 Windows 操作系统的连接计算机添加 Windows 性能计数器数据源。
参数
-Confirm
在运行 cmdlet 之前,提示你进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | False |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-CounterName
指定计数器的名称。
类型: | String |
Position: | 5 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-DefaultProfile
用于与 azure 通信的凭据、帐户、租户和订阅
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Force
强制命令运行而不要求用户确认。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-InstanceName
指定实例名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-IntervalSeconds
指定集合的间隔。
类型: | Int32 |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-Name
指定数据源的名称。
类型: | String |
Position: | 3 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-ObjectName
指定对象的名称。
类型: | String |
Position: | 4 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-ResourceGroupName
指定包含计算机的资源组的名称。
类型: | String |
Position: | 1 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-UseLegacyCollector
使用旧收集器或默认收集器。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | False |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Workspace
指定运行此 cmdlet 的工作区。
类型: | PSWorkspace |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-WorkspaceName
指定运行此 cmdlet 的工作区的名称。
类型: | String |
Position: | 2 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |