Hello,
Thank you for posting in Microsoft Q&A.
Based on the description, I understand your question is related to PowerShell Pipes Not Working In Visual Studio.
Check you have the latest version of the PowerShell extension for VS Code installed. You can update it from the Extensions view in VS Code.
Check the execution policy in VS Code is set to allow script execution. You can set it using the following command:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Also, check you are using the PowerShell Integrated Console in VS Code. You can switch to it by selecting it from the terminal dropdown.
If previous steps don't resolve the issue, you might want to consider using a different approach to manage the group members, such as exporting the members to a CSV file and then processing them.
Have a nice day.
Best Regards,
Molly
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it