Most Valued User Mathias Gindler Posted December 18, 2019 Most Valued User #1 Share Posted December 18, 2019 Hallo zusammen, ich bräuchte eine Möglichkeit, über Powershell alle Mitglieder einer Gruppe aus dieser zu entfernen - es wäre nett, wenn mir hier jemand kurz unter die Arme greifen könnte 🙂 Vielen Dank und schöne Feiertage! Link to comment Share on other sites More sharing options...
Most Valued User Solution SvenS Posted December 19, 2019 Most Valued User Solution #2 Share Posted December 19, 2019 PS C:\Windows\system32> get-help -full Remove-IpPbxGroupMember NAME Remove-IpPbxGroupMember ÜBERSICHT Removes user from group. SYNTAX Remove-IpPbxGroupMember [-GroupEntry <GroupEntry>] [-UserEntry <Object>] [-UserName <String>] [-WhatIf] [-Confirm] [<CommonParameters>] Remove-IpPbxGroupMember [-GroupName <String>] [-UserEntry <Object>] [-UserName <String>] [-WhatIf] [-Confirm] [<CommonParameters>] BESCHREIBUNG The Remove-IpPbxGroupMember cmdlet removes a user from a group. If no user is specified all users are removed from a group. PARAMETER -GroupEntry <GroupEntry> [GroupEntry] object where the user should be removed. Erforderlich? false Position? named Standardwert Pipelineeingaben akzeptieren?true (ByValue) Platzhalterzeichen akzeptieren?false -GroupName <String> Name of the group where the user should be removed. Erforderlich? false Position? named Standardwert Pipelineeingaben akzeptieren?false Platzhalterzeichen akzeptieren?false -UserEntry <Object> [UserEntry] or [UserAdminView1Entry] of the user who should be removed. Erforderlich? false Position? named Standardwert Pipelineeingaben akzeptieren?false Platzhalterzeichen akzeptieren?false -UserName <String> Name of the user who should be removed. Erforderlich? false Position? named Standardwert Pipelineeingaben akzeptieren?false Platzhalterzeichen akzeptieren?false -WhatIf [<SwitchParameter>] Erforderlich? false Position? named Standardwert Pipelineeingaben akzeptieren?false Platzhalterzeichen akzeptieren?false -Confirm [<SwitchParameter>] Erforderlich? false Position? named Standardwert Pipelineeingaben akzeptieren?false Platzhalterzeichen akzeptieren?false <CommonParameters> Dieses Cmdlet unterstützt folgende allgemeine Parameter: "Verbose", "Debug", "ErrorAction", "ErrorVariable", "WarningAction", "WarningVariable", "OutBuffer", "PipelineVariable" und "OutVariable". Weitere Informationen finden Sie unter "about_CommonParameters" (http://go.microsoft.com/fwlink/?LinkID=113216). EINGABEN [GroupEntry] $GroupEntry [string] $GroupName AUSGABEN None -------------------------- BEISPIEL 1 -------------------------- PS C:\>Remove-IpPbxGroupMember -GroupName "MyTestGroup" -UserName "Sebastian" Removes user "Sebastian" from group "MyTestGroup". -------------------------- BEISPIEL 2 -------------------------- PS C:\>Remove-IpPbxGroupMember -GroupName "MyTestGroup" Removes all users from "MyTestGroup". -------------------------- BEISPIEL 3 -------------------------- PS C:\>Get-IpPbxGroup -GroupName "MyTestGroup" | Remove-IpPbxGroupMember -UserName "Sebastian" Removes user "Sebastian" from group "MyTestGroup". -------------------------- BEISPIEL 4 -------------------------- PS C:\>Get-IpPbxGroup -GroupName "MyTestGroup" | Remove-IpPbxGroupMember Removes all users from "MyTestGroup". -------------------------- BEISPIEL 5 -------------------------- PS C:\>Get-IpPbxGroup | Remove-IpPbxGroupMember -UserName "Sebastian" Removes user "Sebastian" from all groups. -------------------------- BEISPIEL 6 -------------------------- PS C:\>Get-IpPbxGroup | Remove-IpPbxGroupMember Removes all users from all groups. Link to comment Share on other sites More sharing options...
Most Valued User Mathias Gindler Posted December 20, 2019 Author Most Valued User #3 Share Posted December 20, 2019 Aaargh - hätte ich auch selber finden können/müssen 😞 Vielen Dank für die Antwort - und schöne Feiertage an alle! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now