Helper/Test-MgmtServer.ps1
<#�
.SYNOPSIS� Helper�function�to check if it is a SCOM management server #>� Function Test-MgmtServer { Try { $ServerRegistryKey = 'HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Server Management Groups' If((Test-Path $ServerRegistryKey)) { $ServerSubkey = (Get-ChildItem -Path $ServerRegistryKey).GetValue('IsServer') If($ServerSubkey -eq '1') { $true } } Else { $false } } Catch { $Error[0].Exception.Message } } |