@Stefan Sabolowitsch
Hi,StefanS.
I suppose that the problem may be your OS language is German while the script is designed for English servers.
Thus it doesn't work in your environment.
Add-ADPermission and other commands may work fine because you manually input the value "NT-Autorität\Anonymous-Anmeldung".
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.