Thursday, February 16, 2017

AntiMalware Health State Error 0x800106f7

Discovered this error on one of my servers - "There was an error 0x800106f7 in creating the Antimalware Health State WMI instance."  This error was occuring every 30 seconds.

Found the article:  AntiMalware Health State Error 0x800106f7

Basically, kill the WMI provider (WmiPrvSE.exe) and let it restart on it own - like a reboot.

tasklist | find "WmiPrvSE.exe"
taskkill /im WmiPrvSE.exe /f

Tuesday, February 14, 2017

Powershell - Syntax notes

Powershell Split Operator
Had a problem with -split of a string variable that contained a "." (period) in it.  Discovered from this article that a period as a regular expression means 'any character', so you must escape the period with a "\".
For example:    $a,$b = $member.SamAccountName -split('\.')

See:   Article - Powershell Split Operator