Skip to content

Simple PowerShell Log Function

Just to share it somewhere with someone, following my powershell basic log function.

Function Log-Message {
    [cmdletbinding()]
    Param (
        [parameter(Mandatory=$true)] [string] $Message,
        [string] $LogLevel = "info"
    )

    $currentDate = Get-Date -Format "yyyyMMdd"
    $currentTime = Get-Date -Format "HHmmss"

    $logMessage = '{0} {1} [{2}]: {3}' -f $currentDate,$currentTime,$logLevel,$message

    $logMessage >> $logFile
}

Enjoy it.

Die KW 28/2020 im Link-Rückblick

`error: archzfs: signature from "ArchZFS Bot <buildbot@archzfs.com>" is unknown trust` and how to solve it

I ran into this error error: archzfs: signature from "ArchZFS Bot <buildbot@archzfs.com>" is unknown trust on multiple machines over the last days.

Since one machine was working which is also running one of my dns servers, I was searching into this direction. After a while, I switched all my machines using this one dns server without fixing the real issue. Furthermore, by just trying to refresh keys with sudo pacman-key --refresh-keys, I ran into another error: gpg: WARNING: Tor is not running.

I could solve this with a one liner:

echo "no-use-tor" >> ~/.gnupg/dirmngr.conf

Next step was finally to delete the broken key and re-import ist again.

sudo pacman-key -d DDF7DB817396A49B2A2723F7403BD972F75D9D76
sudo pacman-key -r DDF7DB817396A49B2A2723F7403BD972F75D9D76
sudo pacman-key --lsign-key DDF7DB817396A49B2A2723F7403BD972F75D9D76

After running through all this steps, I was able to run a system update again with pacman.

Thanks to this issue report on github, this entry on redit and this entry on gnupg.org.

Die KW 27/2020 im Link-Rückblick