Monday, October 29, 2018

SCOM 1807 Universal Linux Monitoring

Recently discovered that some of the CentOS boxes that I've pushed the agent into came up as “Version Unknown” at the UNIX/Linux Computers within the Administration space in the SCOM console.

Checking further, there’s no monitoring data for the usual CPU / Memory / Logical Disk and Network from the servers.

Did a bit of troubleshooting and realized that from the “Microsoft System Center 1807 MP for UNIX and Linux” downloaded here, it seems to be missing the “Microsoft.Linux.Universal.Monitoring.mp”

image

Once imported the relevant mp from the SCOM 1801 media (notice the version difference), all started to work again Smile

Tuesday, October 9, 2018

Monitoring SNMP v1 Trap

Creating a post on some work I'd done couple of year ago so that it won’t be forgotten.

I know SNMPv1 is definitely obsolete by now but what if there are still some requirements to monitor SNMPv1 traps with SCOM ?

One of the way is to

  1. Create a custom MP on the trap you are going monitor with SCOM
  2. Export that custom MP as an XML
  3. Within the XML file, locate the version tag (<version>…</version>)
  4. Replace the string within the tag to 1, refer samples below


Before

image


After

image


and that should do the trick Smile

Monday, October 8, 2018

Setting OneDrive folder to be Always Available Offline

Was recently thrown with a challenge during a Windows 10 migration project for a client to set certain folders in their OneDrive for Business to be always available offline, once user’s data has been successfully migrated (to OneDrive) from on premise file server.

For the benefits of  everyone, latest version of OneDrive for Business client comes with improved features that allows you to either set files / folders to be always available offline or online (to free up spaces of your local storage)

image

While this option is available out of the box when the OneDrive sync client has been successfully setup, how do we further automate it so that certain files / folder can be set to “Always keep on this device (available offline)” without user’s intervention ?

Referring to the details online, we can create a PowerShell script using the attrib.exe, but based on my testing, “attrib -U +P /s” sets all the files / subfolder of the target folder you performed the command at to be available offline but not the parent folder.

To fix this, you can include a /D switch, as in “attrib -U +P /s /D”.

I’ve included a humble script of mine to apply the settings when the folder exists and the settings had not been applied.

$targetFolder = "<Target Folder>"

$rootDir = $env:userprofile + "\<your OneDrive Path>"
$FolderPath = $rootDir + "\" + $targetFolder


if (test-path $FolderPath)
{
     set-location $rootDir

    $Attrib = attrib $targetFolder

    $Attrib = $Attrib.trim()

    $arrayAttrib = $Attrib.Split("C:")

    $fileAttib = $arrayAttrib[0]
     $fileAttib = $fileAttib.TrimStart()
     $fileAttib = $fileAttib.TrimEnd()

    if ($fileAttib -ne 'P')
     {
         Set-Location $FolderPath
         attrib.exe +P -U /S /D

        Set-Location $rootDir
         attrib.exe +P -U /S /D $targetFolder
     }
}


Linking this script to a GPO logon script will make sure that the desired folder is always set available offline when user logs into their machine.

Enjoy… Smile