Hi everyone,
I am asked to monitor some of our divices within Centreon.
Some templates are already used, so I was asked to edit a script for gatheing some Data.
We are in an SCCM Iinfrastructure, we have some Distribution Points and some PCs configured as Peer Cache.
So, for those PCs, I want to monitor some of theire characteristics. I can’t use SNMP on the PCs because it is deprecated and is no more available within Windows 10 OS.
Microsoft advise is to use the CIM model.
I have the request for the data I want to gather:
$namespace = "ROOT\ccm\Policy\Machine\ActualConfig"
$classname = "CCM_SuperPeerClientConfig"
$SPCParameters = Get-WmiObject -Class $classname -ComputerName $computer -Namespace $namespace | Select-Object CanBeSuperPeer, HttpsEnabled
$SPCParameters.CanBeSuperPeer
$SPCParameters.HttpsEnabled
if(($SPCParameters.CanBeSuperPeer -eq $true) -and ($SPCParameters.HttpsEnabled -eq $true)){
# Rien à faire, tout est ok
}
else{
Write-Host "Vérifier la présence du " $computer "dans la collection SPC"
}
My question:
How do I use WSMAN to implement this request ?
A full tutorial would be a real help. I am a newbie to Centreon.
Thanks for any help,