scom

I want to fetch the SCOM alerts data. But I keep getting the error 401. I am passing the credentials right

蹲街弑〆低调 提交于 2021-02-11 14:12:35
问题 My script looks like import requests import base64 user="domain\\username" pass="password" Authentication_mode="Windows" tok=Authentication_mode+":"+user+":"+pass #referring the doc for authentication at https://docs.microsoft.com/en-us/rest/api/operationsmanager/authentication/login token=base64.b64encode(bytes(token,'utf-8')).decode() headers={'content-type':'application/json', 'Authorization': 'Basic %s' % token } payload={} url="http://<Servername>/OperationsManager/authenticate" respone

SCOM REST API to get Windows/Linux machine's availability (whether the server is running & reachable)?

拈花ヽ惹草 提交于 2021-01-29 09:09:47
问题 I want to know whether SCOM exposes an API from which I can get the server status (whether the server is running & reachable) given a particular object id. 回答1: Yes in SCOM 2019 UR1+ you can access the rest API programmatically and get the state. POST http://<Servername>/OperationsManager/data/state Retrieve SCOM State Data Quick Start – SCOM REST API Here is an example in PowerShell using the SCOM REST API $SCOMHeaders = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"

Get class of returned object by PowerShell command - determine a cmdlet's output data type

六月ゝ 毕业季﹏ 提交于 2020-05-29 11:42:05
问题 In PowerShell, if a command returns an array of one or more objects, I can find out the class of the object by the following method: $ab = SampleCommand $ab[0].getType() But, how can I find out the default return type of a command if the command returned nothing (array of 0 values)? Note: For example, I am working on SCOM PowerShell commands, and I am trying to find the default return class type of command get-scomscadvisoragent , but it returns nothing as the advisor agent is not configured

Get class of returned object by PowerShell command - determine a cmdlet's output data type

断了今生、忘了曾经 提交于 2020-05-29 11:41:07
问题 In PowerShell, if a command returns an array of one or more objects, I can find out the class of the object by the following method: $ab = SampleCommand $ab[0].getType() But, how can I find out the default return type of a command if the command returned nothing (array of 0 values)? Note: For example, I am working on SCOM PowerShell commands, and I am trying to find the default return class type of command get-scomscadvisoragent , but it returns nothing as the advisor agent is not configured

How to insert performance data to DW database using SCOM SDK?

跟風遠走 提交于 2020-01-15 03:35:31
问题 We have created a Inbound Connector and custom Management Pack. We send data to our SCOM server using .NET SDK examples. We can see performance data and events on SCOM console. But when we create Performance report ( Reporting > Microsoft Generic Report Library > Performance ) we do not see our Performance Counters. It seem we have a trouble with inserting performance data to DW database. Please ask me about any additional information which I can provide to solve the trouble. UPDATE Our

Cannot set SCOM maintenance mode remotely

♀尐吖头ヾ 提交于 2019-12-12 05:09:16
问题 We're trying to put servers in maintenance mode remotely. I'm using SCOM functions created by Tom Schumacher. If I do the following on the SCOM server, the process completes and I'm able to place a server in maintenance mode and stop it again: #load the function . C:\temp\opsmanagerFunctions.ps1 #Import the OpsMgr module Import-Module OperationsManager #Set server into maintenance mode Start-serverScommaintenance -servername testserver -message "test" -maintmodeinMinutes '6' #Stop server