There are various sources about this on the internet already but none of them fit my needs. What I needed: - it uses the current user - it should be as simple as possible So, here's my version - works just fine in powershell scripts and therefore in SCOM...