
PowerShell ConstrainedLanguage Mode per Gruppenrichtlinie einstellen
PowerShell Language Modes sind eine Möglichkeit die Funktionalität der PowerShell einzuschränken, um die Sicherheit eines Systems zu erhöhen. Das ist natürlich nur ein kleiner Baustein in einer größeren Sicherheitsstrategie, also das alleine ist noch kein ausreichender Schutz für ein System. Gleichzeitig ist das auch ein zweischneidiges Schwert: Vorteil: Wir entziehen potenziellen Angreifern ein mächtiges Werkzeug. Nachteil: Wir selbst als Administratoren können die PowerShell an einem System auch nicht mehr richtig nutzen....

[English] Exchange EAC stopped working after decomissioning all Mailbox Databases
I had this weird issue with a Exchange Server environment: The company had an Exchange Server 2016 DAG and migrated all User Mailboxes to Exchange Online. I then installed a fresh Exchange Server 2019 for Recipient Management and SMTP-Relay. To use the Exchange Server 2019 Hybrid License, I did not create a Mailbox Database. I removed all remaining System Mailboxes and Arbitration Mailboxes from the Exchange 2016 Servers. I decomissioned the DAG and uninstalled Exchange from the old Servers....

Synchronisierte Exchange Objekte ohne Exchange Server verwalten
Es ist ja schon seit einiger Zeit möglich, die Exchange Server Verwaltungstools ohne einen vollständigen Exchange Server zu verwenden. Die meisten Anleitungen gehen davon aus, dass schon mindestens ein Exchange Server vorhanden war und dieser dann entfernt wird. Und die Microsoft Dokumentation verweist nur am Rande auf das Thema und erklärt nicht wirklich. In diesem Post gehe ich auf ein Szenario ein, was vorallem viele kleinere Unternehmen betrifft: Im Microsoft 365 Admin Center wird angezeigt:...
[English] Use ntfy.sh with Home Assistant
Just a quick note if you want to use ntfy.sh with Home Assistant. Setup I added the following section to my /config/configuration.yaml file: 1 2 3 4 5 6 7 8 9 10 11 12 13 shell_command: ntfy: > curl -X POST --url 'https://ntfy.sh/{{ topic }}' --data '{{ message }}' --header 'X-Title: {{ title }}' --header 'X-Tags: {{ tags }}' --header 'X-Priority: {{ priority }}' --header 'X-Delay: {{ delay }}' --header 'X-Actions: {{ actions }}' --header 'X-Click: {{ click }}' --header 'X-Icon: {{ icon }}' Usage To send send a notification, I use this YAML action in an Automation....

Exchange Online per Azure Automation steuern im Jahr 2023
Ich versuche es kurz und knackig zu halten: Wenn ihr Exchange Online per Azure Automation steuern wollt, dann ist Managed Identities was ihr benutzen solltet (Stand: Anfang 2023). Legacy Ansatz Früher wurden dafür auch gerne RunAs Accounts oder Plaintext Credentials (🤢) verwendet, aber das gilt mittlerweile als veraltet. RunAs Accounts sind zum Herbst 2023 abgekündigt und zu Klartext-Kennwörtern muss ich nix sagen, oder? Eventuell bieten sich noch App Registrierungen in Azure AD an, aber wenn ihr wirklich einfach nur per Azure Automation ein paar Exchange Einstellungen automatisieren wollt, ist das eigentlich nicht notwendig....

[English] Set Azure AD Connect Staging Mode via PowerShell
Here’s a quick tip on howto enable or disable the Staging Mode in Azure AD Connect via PowerShell. Sadly there is no native Cmdlet in the style of Set-ADSyncStagingMode or something like that. In this article I’ll first explain the approach and then later on list the full command block you can use. So feel free to skip below to the end of the post. The following PowerShell Cmdlets have to get executed on the Azure AD Connect Server....

[English] Exchange Server Setup Incomplete but fails to complete
I had an issue with a broken Exchange Server 2016 CU23. Or rather it was not fully installed. It was just a test environment, but I thought it would be useful or interesting to drill down on that issue. I’ll guide you through my troubleshooting steps / thought process. Try to continue Setup First I tried to resume the setup. The setup fails early - at Step 1 of 13: Stopping Services....
[English] How to remove all merged Git Branches on Windows
Here’s a quick tip on howto remove Git Branches that were already merged (thus not necessary to keep around anymore) locally on Windows, using PowerShell. Assuming that you do have Git for Windows installed. Execute these commands on your own risk. List all merged branches You can list all merged Git Branches by running: 1 git branch --merged Exclude current branch and “main” branch Then we |-pipe it into the following, to exclude the currently selected branch (marked with an asterisk *) and the main branch....

[English] How to get Group Membership count with Microsoft Graph API
Apparently it’s not that easy to get the amount of members of a group with the Microsoft Graph API. We need to specify the additional header ConsistencyLevel: eventual to use the Advanced Query Capabilities. Then we can use the Query parameter $count. Alternatively I found that I could also add it as an URL query parameter instead. That would be &ConsistencyLevel=eventual. Example Queries Replace the Group ID (02bd9fd6-8f93-4758-87c3-1fb73740a315) with your desired Azure Active Directory Group ID....

Microsoft Teams PowerShell: Authentifizierungsfehler/ActiveX-Steuerelement kann nicht instanziiert werden
Ich habe heute einen merkwürdigen Fehler beim Verbinden mit der Teams PowerShell erhalten. Ich notiere das hier kurz, da ich nach 15 Sekunden Internetrecherche keine Lösung dazu gefunden habe 😇. Alles was ich dazu spontan gefunden hatte, hatte nichts mit Teams zu tun. Ich wollte mich einfach nur per Connect-MicrosoftTeams mit der Microsoft Teams Administration per PowerShell verbinden. Ohne Angabe irgendwelcher weiteren Parameter, einfach ganz normal mit einem personalisierten Adminkonto anmelden und dann MFA bestätigen und so weiter....