问题标签 [scom]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
552 浏览

powershell - SCOM Create ClassInstance Override via PowerShell

At this point I'm getting pretty desperate for help.. Because of certain configuration issues (I will not be going into details about this... I had nothing to do with it, I'm just dealing with the issues having to use SCOM afterwards...) I am in desperate need to script overrides in SCOM, and I've hit a wall.

In very very short: I need to set an override on a disk (or single object instance).

After finally figuring out that there is a ContextInstance param where I need to specify the object instance reference, I thought things would get easier.. but now I keep getting the error:

Exception calling "AcceptChanges" with "0" argument(s): "Object reference not >set to an instance of an object."

Shouldn't the object reference be set when I specify the GUID in the ContextInstance? I've pasted the code below, so you have a better view of what I'm doing / trying to do. I apologize for the bad looking code, but I'm in a hurry, and I'm just testing.

ANY input on how to get this working is highly (very highly!) appreciated!

#xA;
0 投票
1 回答
2487 浏览

powershell - 通过 PowerShell 命令获取返回对象的类 - 确定 cmdlet 的输出数据类型

在 PowerShell 中,如果一个命令返回一个或多个对象的数组,我可以通过以下方法找出对象的类:

但是,如果命令没有返回任何内容(0 值的数组),我如何才能找出命令的默认返回类型?

注意:例如,我正在处理 SCOM PowerShell 命令,我正在尝试查找 command 的默认返回类类型get-scomscadvisoragent,但它没有返回任何内容,因为在我的实验室设置中未配置顾问代理。因此,我无法获得返回对象的类。

0 投票
1 回答
181 浏览

c# - SCOM SDK如何删除客户端缓存

我使用 C# SCOM SDK 将我们的性能和事件数据收集到 SCOM 1801。

为了连接到管理组,我使用下一个代码:

一切正常。

managementGroup.Dispose()但是 GC 在调用方法后不会清理内存。

我已经使用 VS 内存配置文件查看了内存。

我可以看到下一个情况:

在此处输入图像描述

当然,我可以使用 ManagementGroupConnectionSettings 类的属性CacheMode=CacheMode.None禁用 缓存

但在这种情况下,SCOM SDK 的工作非常非常缓慢。

所以我认为正确的方法是使用缓存,在必要的工作之后需要删除缓存。

如何删除 SCOM SDK 客户端缓存?

0 投票
1 回答
111 浏览

xml - Add IntervalSeconds Element to Script Based Monitor via MP Author

I’ve created a Powershell Script Based Monitor using Silect MP Author so that I will be able to schedule their runtime (e.g. Every Day – Sun – Thu). Problem is, That I also need the availability to adjust the interval time (e.g. Every 30 Seconds). And for some reason, this is not a valid option to combine in the MP Author Wizard. You can only choose from the 3 following options: 1. None 2. Daily 3. Periodic Does somebody know what is the Interval Time configured if the Daily option is been chosen? Furthermore, While examining the XML file MP Author has created, I can see that when choosing the Daily options, the following elements have been created:

Can I just add New Element (For and tags):

And a New line in the Tag for the IntervalSeconds Value?:

As Hard Coded Value

Or as a Varibel?

0 投票
1 回答
111 浏览

sdk - 将 SCOM SDK 与 tls1.2 一起使用

我们如何在 scom sdk 中设置 tls 版本?我用

使用 ManagementGroupConnectionSettings 但它没有任何参数来指定 tls 版本。

从 SCOM 2012 R2 开始,支持 TLS1.2。sdk 也应该支持相同的功能,以便从客户端应用程序创建与 tls1.2 的安全连接。

搜索了微软文档,但没有得到任何信息。有人可以对此有所了解吗?

谢谢

0 投票
1 回答
607 浏览

vbscript - 在连接字符串中使用 VBScript 参数

我正在使用 vbs 脚本来查询 SQL Server。

在连接字符串中,我正在尝试传输以下参数:服务器名称(PKNSQLEXP07\SQLINST7) 和端口号(2890)。

问题是,我知道 VBScript 中的参数需要在连接字符串之外,但我不确定如何实现。

这是我的连接字符串,没有参数:

这是参数:

参数(ConnectionStringTcpPort)之间应使用逗号符号。

但到目前为止,我没有运气,我当前的连接字符串带有参数。

0 投票
1 回答
799 浏览

php - PHP 中的 System Center Operations Manager (SCOM) 1801 REST API 身份验证

我正在 PHP 中开发一个集成类,以使用新的 REST API 接口访问 SCOM 数据。我找不到使用 PHP 连接到 API 的其他文档。我到目前为止是这样的:

使用此代码,我收到以下错误:

{"errorMessage":"传递的参数不能为空","errorTrace":""}

并且 IIS 日志报告 400 错误。

我怎样才能解决这个问题?有什么我想念的吗?

谢谢,
恩佐

0 投票
1 回答
238 浏览

powershell - SCOM 2012 Windows 服务监控目标对象

如何找到针对使用 Powershell 使用模板创建的 Windows 服务监视器的组的名称?

我的意思是,我使用模板在 scom 中创建了一个监视器,我正在检查一项服务。我将监视器定位到一个组。我想用 Powershell 查找组名。

你可以看看这张图片

我想获取有关 Windows 服务模板的目标信息。如何使用 Powershell 获得此功能?

0 投票
1 回答
365 浏览

c# - “找不到文件”:尝试在库中创建新文件夹时,标题的第一个为空白

我正在尝试在文档库中创建一个新文件夹。实际上,代码运行良好,但是当新文件夹的标题以空白开头时,我得到一个异常“找不到文件”并且没有创建文件夹。

我已经尝试对标题进行编码:将 blach 替换为"%20""+"。在这种情况下,文件夹已创建,但它包含其他字符,例如"+"标题中的第一个位置。

我尝试使用浏览器在 SharePoint 应用程序中创建文件夹“blankBefore” - 它有效。该文件夹已创建,看起来像这样“blankBefore”。

我可以创建标题中带有空格的文件夹,但如果文件夹的标题以空格开头,则不能。

0 投票
1 回答
93 浏览

powershell - 数组中奇怪的不存在的属性

所以我有一个名为 $monitors 的数组。我认为它包含的内容并不重要,但它是一个 SCOM 监视器列表,由以下两行创建:

输出这个数组,它的成员似乎有两个属性,称为 Overridden 和 Target(一直向右滚动):

但根据Get-Member,“覆盖”不存在:

Target 属性确实存在,但如果我尝试使用以下方式打印它,它的值会完全不同Format-Table

扩展属性仍然没有显示我们之前看到的值:

如何访问 Target 和 Overridden 参数,以便对它们进行排序、将它们导出为 CSV 等?