Posts

Showing posts from January, 2024

Pita

Makes 6 pitas. Takes 1 day (do 2 for more flavour). Scales well. Recipe is solid. Ingredients 165 gm warm water. 4 gm yeast. 256 gm white flour. 5 gm salt. 14 gm oil. Method Mix water and yeast. Add flour and salt. Mix a bit then add oil. Mix well, wait until doubled. Divide as needed (70 gm each). Rest 30 mins. After 15 mins crank oven to max. Rolling pin to a 6" circle, not too flat. Rest 15 mins. Oven now ready to go. Bake on stone for 2 mins. They should be fluffy, not crispy or brown. Just do 3-4 at a time on the square stone. If doing batches let oven heat up after opening door.

Grey agents

Anything that runs a health service in SCOM can go grey (or gray 🙄). That includes agents, gateways and management servers. This article seeks to demystify identifying the agents that have gone grey, because between using PowerShell and SQL, it's not as easy as it should be. Here's the current SQL query I use. The logic is: It targets the health service to get unique values, not Windows computer. Just get unhealthy ones -  IsAvailable=0 Not in maintenance mode -  IsInMaintenanceMode=0 Here's the current PowerShell script I'm using. Theoretically it should return the same info as the SQL query. Open up both articles so you can reference them. The interesting line in PowerShell is this: Note: I  use  Microsoft.SystemCenter.HealthService  to get anything that runs a health service, I don't just want agents. get-scomclass -name "Microsoft.SystemCenter.HealthService" | get-scomclassinstance | where {$_.IsAvailable -eq $false -and $_.InMaintenanceMode -eq $fa

Keyset does not exist

I got this alert for an agent: Alert name:  System Center Management Health Service Unable to Process New Configuration Alert description: The System Center Management Health Service 6C0DB9CB-3E55-748A-954A-577E3DBEAEF7 running on host NAME and serving management group with id {00E1446C-53D6-E622-676C-FFCE6C114CBE} is not healthy. System Center Management Health Service is unable to process or load configuration. I tried the usual fixes but it wouldn't connect. Looking in the ops log I saw this event: Event Id: 7022 Source: HeathService Description: The Health Service has downloaded secure configuration for management group NAME , and processing the configuration failed with error code Keyset does not exist(0x80090016). Instruction to fix are here.  Basically you need to delete the certificate in MMC > Certificates > Computer account > Operations Manager > Certificates then restart the health service. You can backup the certificate before deleting but you can'

Mp import fails when you remove a property from a class

When testing MPs you might find it fails on import when you remove a property that was previously in your mp. I have also discovered this happens if you just comment out the property in the mp. Here's an example of the error: Verification failed with 1 errors: ------------------------------------------------------- Error 1: Found error in 1|TestB.Microsoft.Intune.ConfigurationManager.Monitoring|1.0.0.0|TestB.Microsoft.Intune.ConfigurationManager.Discovery.Server/DS|| with message: The configuration specified for Module DS is not valid. : Cannot find specified MPSubElement InstallFolder, on MPElement= TestB.Microsoft.Intune.ConfigurationManager.Class.Server, in expression: $MPElement[Name="TestB.Microsoft.Intune.ConfigurationManager.Class.Server"]/InstallFolder$ The solution is to remove the old mp and add new one with a new name and no references (even commented out) to the old property.

Regex with SCOM

This is an article to help with regex in SCOM. This  Microsoft article explains it more. Regex test site here . It's not that useful because the syntax is slightly different in SCOM . It's important to note that in SCOM, group membership is done with Perl whilst expression filters use .NET 🤯. Populating groups Examples Match string starting with jump OR sql.  The  ?i:  ignores case.  This  article helped. (?i:^jump)|(?i:^sql) Match string starting with EMLXM (ignores case) and a domain name of your.ad.domain.name. These work but note the different starting characters: (?i:^EMLXM.*.your.ad.domain.name) ^(?i: EMLXM.*. your.ad.domain.name ) Match any character (not blank). Yes it's just a dot. . Expression filters I had to use regex in a discovery in my Trellix mp to discover computers running the Trellix ePolicy Orchestrator role. The computers in my environment had a reg key with one of these values: C:/PROGRA~2/McAfee/EPOLIC~1 D:/McAfee/EPOLIC~1 The discovery expression l

Wholemeal loaf

Makes 1 loaf. Takes 2 days. This is a solid recipe. Original recipe  here . When it's warm rest times are ~1 hour. Ingredients Tangzhong 125 gm water 25 gm flour Method Add water and flour to pan and heat on low, stir constantly for 10 mins. Get it to 85 C or higher, this gelatinizes the starch and creates sweetness and flavour. Put in Pyrex container, fridge overnight. Dough Original recipe had sugar. 300 gm water (was 250 gm) 8 gm yeast 250 gm white flour (was 350 gm) 250 gm wholemeal flour (was 160 gm) 8 gm salt (recipe 5 gm) 30 gm butter Method Room temp butter and tangzhong. Warm water to 35 C. Add water and yeast to bowl, leave 10 mins. Add flours and salt and mix with spoon. It will be very scraggy. On bench, mix well until combined. Add butter and mix well. Add tangzhong and mix well. (10 mins) In bowl 1-4 hours until doubled. Oil the tin. Rolling pin dough into big oval. Fold in sides, then roll up into width of tin. This gives a hump shape. Add seeds if using then put in

Muffins

Ingredients 2 cups plain wholemeal or white flour. 3 tsp baking powder. 1/3 cup raw or brown sugar. 1 egg. 1/3 cup olive oil. (was 1/2) 1 cup milk (any type) or water. 1 cup's worth of flavouring like nuts / berries / sultanas. Method Heat oven to 180 C. Add wet stuff to bowl and mix. Do 2 bananas if using. Add dry stuff to bowl and combine. Put in tray and sprinkle stuff on top like oats etc. Bake 20-30 mins or until toothpick comes out clean.

SQL queries

Common stuff SCCM SCO SCOM Note: Not sure if these are solid so you may need to tweak. Common stuff Variables declare @MyVar as varchar(100) set @MyVar = '119084%' select * FROM [commserv].[dbo].[CommCellBackupInfo] where jobid like @MyVar Insert row insert into [SCOMCmdb].[dbo].[Configuration] (Name, Class, Category, status, comment) values ('server.name', 'FederationServer', 'CatA', 'Project', 'Test jump box.') Delete row delete from [SCOMCmdb].[dbo].[Configuration] where Name ='server.name' and Class='WindowsServer' Update existing row update [SCOMCmdb].[dbo].[Configuration] set status = 'Active', Category = 'CatB' where Name = 'server.name' and

Renew Windows eval license

If you build a test lab you don't need to rebuild it when the eval license expires. Just make sure you have an internet connections and run these: Show current license: slmgr -dlv Rearm it (get new license): slmgr -rearm Run the first command again to see new license.

Purge data from SCOM database

I've done this successfully a few times when agents won't connect to mgmt servers or gateways - even after trying the usual (bounce health service or delete folders). As soon as I did the purge (the last query) the agent appeared in the pending queue. After approving the agent, everything was healthy. I followed this article which doesn't discuss my issue but it was my only real option as logging a case with MS wouldn't really help. The environment I did this on was SCOM 2016 UR10. Query 1 First run this query on the OperationsManager db. It is "To inspect the database relationships to see if there is a still a discovery associated with a computer". DECLARE @name varchar(255) = '% your_agent %' SELECT BME.FullName, BME.DisplayName, BME.Path, dv.DisplayName AS 'DiscoveryDisplayName', dv.Name AS 'DiscoveryName' FROM typedmanagedentity TME  JOIN BaseManagedEntity BME ON TME.BaseManagedEntityId = BME.BaseManagedEntityId  JOIN DiscoverySour