Remove user from usergroup independent of language settings

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.

This forum is a space to discuss coding in PowerShell, and technical issues related to development.

- Question about a licensed SAPIEN product? Post here: Product Support for Registered Users
- Question about a trial SAPIEN product? Post here: Former and Future Customers - Questions
This topic is 9 months and 4 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
UserPro56
Posts: 1
Last visit: Sun Feb 04, 2024 12:27 pm

Remove user from usergroup independent of language settings

Post by UserPro56 »

Hi all, I want to remove member "RAdmin" from "Users" group and the below code works. Problem is if the language settings on system is in another language than english it does not work, for example if it is "Benutzer" (German) or "Usuarios" (Spanish). Please let me know how to handle this issue.
  1. $members = "RAdmin"
  2. Remove-LocalGroupMember -Group "Users" -Member $members
This topic is 9 months and 4 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked