Skip to content

Tag: Gist

Automate macOS Mojaves dark mode

In my opinion, the macOS Mojaves dark mode is one of the best features that Apple introduced for me. I work after hours a lot and the dark mode is awesome for that!
But I think Apple forgot to implement a automation or scheduler for that!

There is a freeware tool called NightOwl that can do the job. I just tested it and it works fine.
But in my workflow I need to do a bit more then just toggle the dark mode of macOS Mojave. Some Apps have the same (and many of then are still not so deeply integrated into macOS Mojave that they use the toggle).
So I came up with an poor mens approach that uses the macOS internal functionality (StartCalendarInterval with LaunchAgents)! to call a script that does all the thinks I want.

PowerShell: Get the Office 365 Endpoint Information from Microsoft

A while ago, I published the reworked script to get Office 365 URLs and IP address ranges. Microsoft has built a new fully rest full Webservice to get the same information via JSON instead of XML.
The only drawback of the new service: If you like to use it for a single produce, you need to filter after you have downloaded the information. The product sets are limited.

However, there are a lot of examples in the new script, these examples show you how, where, and what to filter.

Uninstall the retired AntiSpam Agents from an Exchange Server

This content is older than 1 year. It might be outdated.

Microsoft announced that they deprecated the support for the SmartScreen Antispam content filters for Exchange Servers. This script uninstall the old and retired SmartScreen Antispam Agents from the local Exchange Server.

There are known issues with the SmartScreen AntiSpam content filters if you run Exchange 2016 on Windows Server 2016. So removing them might be always a good idea if you want to have a stable Exchange.

The Script removes the following AntiSpam Agents:

  • Content Filter Agent
  • Sender Id Agent
  • Protocol Analysis Agent

Before running the script and remove the AntiSpam Agents listed above, you should consider a solid alternative solution. There are several good on Premises Solutions available, and there are even more Cloud Services, including Microsoft’s own Exchange Online Protection (EOP). This could be handy if you have Office 365, you just change/tweak the Mailflow and your Mailboxes are protected.
My favorite solution is a CentOS based Linux Box running Postfix, SpamAssassin and MIMEDefang. I use this together with some AntiVirus solutions to scan all inbound and Outbound mails. However, this is just my personal favorite because it’s very reliable and flexible, but I know that many prefer a all-in-one solution running on Windows. Again, there are a lot of great solutions out there!

Mozilla FireFox deployment on MacOS and Windows

This content is older than 1 year. It might be outdated.

I’m a big fan of Munki (pronounced monkey, /ˈmʌŋki/, m ah nk ee, or Mung – KEY) an open-source project started by Walt Disney Animation Studios to deploy software and packages to Mac OS X and MacOS based clients. It is written mostly in Python, and it provides a nice way to enforce software installation and/or updates. And since it offers a Mac App Store like Client experience a lot of optional installations (e.g. self-service).

One of the things that I find very useful: You can use scripting as pre- and post-installation parts to customize everything. A few years ago (yep, I use this software for a while now) I started to build several packaged for others. Then the fist enterprise came along and asked me to help them out with an existing Munki installation, during that project, I created a lot of new packages and tweaked most of the existing ones.

Now, a couple of projects and years later, I found, that many still have issues creating packages with customization.

Here is my approach, and I try to stick with it whenever possible: Use packages that you can get from the Vendor, or the Project (if open Source). Even better: Establish an AutoPKG process and work with overrides!

Then use the power of shell scripts to tweak and customize. I’m a scripting guy! I know.

Check System for CVE-2017-0290

This content is older than 1 year. It might be outdated.

A code-execution vulnerability was found in the Microsoft Malware Protection Engine with Engine Version before 1.1.13704.0. This vulnerability is known as CVE-2017-0290.

The good news: Microsoft already released a fix for this issue!

Here is a quick way to check if a system is vulnerable:

1
2
3
# Returns a Bool (yep. just True or False) for CVE-2017-0290 vulnerability
(Get-MpComputerStatus).AMEngineVersion -ge '1.1.13704.0'
# If you see False you should update your Defender Definition File As Soon Ass Possible (ASAP)
Copyright © 2018 by Joerg Hochwald. All rights reserved. ● Site is powered by Author