Skip to content

Instantly share code, notes, and snippets.

View blakedrumm's full-sized avatar
🏠
Working from home

Blake Drumm blakedrumm

🏠
Working from home
View GitHub Profile
select *
from BaseManagedEntity BME
LEFT JOIN TypedManagedEntity TME
ON BME.BaseManagedEntityId = TME.TypedManagedEntityId
where TME.BaseManagedEntityId IS NULL
@blakedrumm
blakedrumm / Update-SCOMCertificate.ps1
Last active June 14, 2023 15:13
This script will allow you to update the certificate used in SCOM, using PowerShell.
param
(
[string]$FriendlyName,
[string]$SubjectName,
[string]$SerialNumber,
[string]$DateIssued,
[string]$ExpirationDate,
[switch]$ShowAllCertificates,
[switch]$UpdateRegistry
)
@blakedrumm
blakedrumm / SCOM_2022_Messages.sql
Created May 23, 2023 18:37
Messages Table for SCOM 2022
EXEC sp_addmessage @msgnum = 777970001, @msgtext = N'指定成管理群組寫入器登入的登入已指定成另一項擱置管理群組連線作業的寫入器登入。請選擇其他登入,或確認/拒絕先前的連線作業', @severity = 16, @lang = 'us_english', @with_log = False, @replace = 'REPLACE'
EXEC sp_addmessage @msgnum = 777970002, @msgtext = N'管理群組已連線至此資料倉儲', @severity = 16, @lang = 'us_english', @with_log = False, @replace = 'REPLACE'
EXEC sp_addmessage @msgnum = 777970004, @msgtext = N'只能由擁有管理群組的資料倉儲執行作業。此管理群組不是擁有者,無法執行要求的作業', @severity = 16, @lang = 'us_english', @with_log = False, @replace = 'REPLACE'
EXEC sp_addmessage @msgnum = 777970005, @msgtext = N'識別碼為 ''''%s'''' 的管理群組不是此資料倉儲的成員,或者您沒有對該管理群組執行動作的權限', @severity = 16, @lang = 'us_english', @with_log = False, @replace = 'REPLACE'
EXEC sp_addmessage @msgnum = 777970006, @msgtext = N'無法從資料倉儲刪除其擁有的管理群組,因為還有其他成員管理群組存在。請先刪除成員管理群組。', @severity = 16, @lang = 'us_english', @with_log = False, @replace = 'REPLACE'
EXEC sp_addmessage @msgnum = 777970007, @msgtext = N'識別碼為 ''''%s'''' 的管理群組不是此資料倉儲的成員管理群組', @severity = 16, @lang = 'us_english', @with_log = False,
@blakedrumm
blakedrumm / Invoke-EnforceSCOMTLS1.2.ps1
Last active March 22, 2024 01:17
Enforce TLS 1.2 in SCOM
<#
.SYNOPSIS
This script allows you to enforce TLS 1.2 on System Center Operation Manager environments.
.DESCRIPTION
Use this script when you need to want to automate the steps listed here:
https://learn.microsoft.com/system-center/scom/plan-security-tls12-config
.PARAMETER AssumeYes
The script will not ask any questions. Good for unattended runs.
@blakedrumm
blakedrumm / SCOM_2019_Messages.sql
Created March 14, 2023 16:11
Messages Table for SCOM 2019
EXEC sp_addmessage @msgnum = 777970001, @msgtext = N'Login specified as Management Group Writer Login is already specified as writer login for another pending Management Group connect operation. Choose different login or confirm/reject previous connect operation', @severity = 16, @lang = 'us_english', @with_log = False, @replace = 'REPLACE'
EXEC sp_addmessage @msgnum = 777970002, @msgtext = N'Management Group is already connected to this Data Warehouse', @severity = 16, @lang = 'us_english', @with_log = False, @replace = 'REPLACE'
EXEC sp_addmessage @msgnum = 777970004, @msgtext = N'Operation may be performed only by Data Warehouse owning Management Group. This management group is not owner and may not perform requested operation', @severity = 16, @lang = 'us_english', @with_log = False, @replace = 'REPLACE'
EXEC sp_addmessage @msgnum = 777970005, @msgtext = N'Management group with id ''''%s'''' is not a member of this Data Warehouse or you do not have permissions to perform actions for that management group'