Hi @Thomas Bender (NAK Westdeutschland)
Via searching online, there is a connection between OneNote searchindex and cache. Here is a thread: OneNote is not indexing you may have a look.
The cache location must be on a non-removal hard disk, but you are using non-persistent virtual machines. In my opinion, we are unable to save the cache.
Besides, I do not find any command or script to rebuild the searchindex automatically.
Thanks for your understanding.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 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.