Viser indlæg fra 2016

Test connection to site on port 80 and 443 with PowerShell, if port 443 fails, then do trace route

Test a connection to a site on port 80 and 443 every 15 seconds for 99999 times. If connection to port 443 fails the run a trace route to find the problem. A log is written to the desktop (currently logged on user's desktop) which prints date and time for very check made.

Find computers that last logged on 360 days ago with PowerShell

Use this code to find computers that last logged on 360 days ago:

Resume Hyper-V replication after server reboot with PowerShell

This PowerShell script will resume Hyper-V machine replication after a server reboot. I schedule it to run each morning. It will write the status to a local log file and will only modify the replica status of the virtual machine if it does not equal Normal.

Cleanup WSUS with PowerShell

Use this script to cleanup WSUS server. I schedule it to run once each week:

Export email addresses from SpamTitan (API) whitelist filter to text file with PowerShell and delete them

I've created this PowerShell script to delete all email addresses from SpamTitan (API) global whitelist filter. Feel free to use it as long as you link to this article on your site or in your script:

Import email addresses to SpamTitan (API) whitelist filter from text file with PowerShell

I've created this PowerShell script to import email addresses into SpamTitan (API) global whitelist filter from a text file. Feel free to use it as long as you link to this article on your site or in your script:

Android 6 on Nexus 5X does not sync, or update, calendar entries and e-mails

I was really disappointed when my new Nexus 5X did not sync new e-mails and calendar entries from the web. I use these functions all day long and the device is useless if it does not update new items.

I already began to install 3rd party apps, but then decided to look into the matter again:

It seems to be a known bug that Google is investigating, but I couldn't wait for them to come up with a fix.

I suspected the cause to be the Android 6 doze function (a battery saving function in Android 6) since my device hadn't updated the calendar for several hours (I could see that my account/calendar was last updated the night before at around 9 p.m.).

To disable the calendar's (and a few other apps, but I suspect that the settings for the calendar is enough) battery save function use the settings:

(The screenshots are in Danish, but I think you get the point)

Disable logon and logoff events (event id 4624, 4625, 4634 (and all the other ones...))

I have tried several times to make my domain controller not log logon and logoff events in the security log. But it seems to ignore the settings in the domain controller group policy. I now use Auditpol in stead - that works (thanks Morgan J):

To disable all logon and logoff messages in the security log use (in an elevated command prompt):

auditpol /set /category:"Logon/Logoff" /success:disable


auditpol /set /category:"Logon/Logoff" /failure:disable

It is also possible to just disable the logon messages by using the subcategory switch:

auditpol /set /subcategory:"Logon" /success:disable


auditpol /set /subcategory:"Logon" /failure:disable

To view the current settings, run:

auditpol /get /category:*