Skip to main content

SCOM agent now displayed under pending management?

1: You install a scom agent manually.
2: It does not show up under pending management.
3: Run powershell to accept it.
Get-SCOMPendingManagement | where {$_.AgentName -eq "mybadassserver"}

Get-SCOMPendingManagement | where {$_.AgentName -eq "mybadassserver"} | Approve-SCOMPendingManagement

Comments

Popular posts from this blog

Move ADFS database

When you move the database for ADFS to a new SQL server use these commands to change the location. $adfs = GEt-WmiObject -namespace root/ADFS -class SecurityTokenService $adfs .ConfigurationdatabaseConnectionstring= "data source=[insertsqlservername\andinstance];initial catalog=adfsconfiguration;integrated security=true" $adfs .put() Set-AdfsProperties –artifactdbconnection ”Data source=<SQLCluster\SQLInstance >;Initial Catalog=AdfsArtifactStore;Integrated Security=True”

ADFS service wont start

The Active Directory Federation Services service terminated with the following error: An exception occurred in the service when handling the control request. In my case an easy fix. There was a typo in the connection string to the database.

SQL server is slow, database update wont run?

Some useful SQL queries to get who is connected to a database, long running queries, queries that lock the database, high cpu queries. Who is connected? Sp_who or Sp_who2 Kill session: Kill [SESSIONID] Long running queries: SELECT sqltext.TEXT, req.session_id, req.status, req.command, req.cpu_time, req.total_elapsed_time FROM sys.dm_exec_requests req CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext High CPU: SELECT s.session_id, r.status, r.blocking_session_id 'Blk by', r.wait_type, wait_resource, r.wait_time / (1000 * 60) 'Wait M', r.cpu_time, r.logical_reads, r.reads, r.writes, r.total_elapsed_time / (1000 * 60) 'Elaps M', Substring(st.TEXT,(r.statement_start_offset / 2) + 1, ((CASE r.statement_end_offset WHEN -1 THEN Datalength(st.TEXT) ELSE r.statement_end_offset END - r.statement_start_offset) / 2) + 1) AS statement_text, Coalesce(Quotename(Db_name(st.dbid)) + N'.' + Quotename(Object_schema_name(st.objectid, st.dbid)) + N'.'...