Posts

Showing posts from August, 2022

Monitoring CPU on workstations

This article explains how to monitor CPU usage on Windows 10 computers and generate an alert and process dump when it exceeds 80%. First, I had to import these MPs: Name Version Sealed Microsoft.Windows.Client.Win10 10.0.0.2 True Microsoft.Windows.Client.Win10.Aggregate 10.0.0.2 True Microsoft.Windows.Client.Win10.BusinessCritical 10.0.0.2 False Microsoft.Windows.Client.Win10.Monitoring 10.0.0.2 True I didn't have a lot of time to test this but in a nutshell some things don't work out-of-the-box as you'd expect. There's a thing called Business Critical client monitoring  that involves adding computers to a group. I tried that and got weird results and because of time, I just ended up enabling the  Microsoft.Windows.Client.Win10.Processor.CPUUt

Scratch

Function Write-Log {     Param ($ScriptState)     Switch ($ScriptState) {         "Information" {             $EventId = 17623             $EventLevel = 0 # 0=Info, 1=Error, 2=Warning         }         "Warning" {             $EventId = 17624             $EventLevel = 2 # 0=Info, 1=Error, 2=Warning         }         "Error" {             $EventId = 17625             $EventLevel = 1 # 0=Info, 1=Error, 2=Warning         }     }     $End = Get-Date     $TimeCount = (New-TimeSpan -Start $StartTime -End $End)     $MomApi.LogScriptEvent( "$ScriptName executed in $( $TimeCount.Minutes ) `m $( $TimeCount.Seconds ) `s $( $TimeCount.Milliseconds ) `ms" , $EventId, $EventLevel, "`nRunning as: $Account`nWorkflow Name: $WorkflowName`nManagement Pack: $( $MPName ) $( "($MpVersion)" ) `nPowerShell Version: $PSVersion`nScript output: $Message" ) } Function Set-TerminatingError {     $ScriptState = "Error"     $Message += &

Lepinja

Makes 1 loaf. Takes 1 day. Ingredients The recipe usually has sugar but we think it's too sweet so don't add it. 250gm water 2 tbsp milk 385gm flour 1 tsp salt 7gm yeast Method Add water and milk to bowl and microwave to room temp (~10-15 secs) Add yeast and mix Add flour then salt, coat salt with flour Mix with scraper until combined, don't knead it Put dough in bowl and wait till it doubles in size (1hr) Put dough on table and knead for 8 mins. It will be very sticky, use the spray bottle to keep it lubed Put dough in bowl and wait till it doubles in size (1hr) Flour surface well and tip dough onto it Ball it up (Jack method) then flour it all over and place on baking paper, DON'T USE A TRAY Flatten and shape into oval/rectangle about 12mm thick Rest for 30 mins or till it's puffed up nicely Put baking stone on middle rack Add seeds and salt as needed Transfer to stone using pizza spade Bake 20 mins @ 200c rotating mid way Notes Update 11/3/2023 -  Followed recipe