Hi @Hinterleitner Andreas , Welcome to Microsoft Q&A,
As long as there are functions in the document, you can use C# to call PowerShell to implement them.
If you want to call a PS script/command in C# then you need to set up the PS session and then invoke the command. You can see the needed code here.
You can also refer to:https://github.com/karenpayneoregon/power-shell-process-cs/blob/master/ProcessingAndWaitSimple/Classes/PowerShellOperations.cs
Best Regards,
Jiale
If the answer is the right solution, 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.