Questions tagged [group-membership]

52 questions
0
votes
1 answer

Remove Multiple Users from All AD Groups with PowerShell

I am trying to run a Script, which gets all users from a specific OU and the removes all those users from the groups they are apart of. Ive tried multiple things but I just cannot get it right. My Code currently looks like this: $DisabledUser =…
ri2312
  • 9
  • 2
0
votes
0 answers

Add all Security Groups to multiple computer objects

I want to combine these below command to add all Security Groups to multiple computer or user objects. As like Get-ADPrincipalGroupMembership Add-ADPrincipalGroupMembership So that what the Get-ADPrincipalGroupMembership will return from a computer…
0
votes
1 answer

Unable to cast object of type 'Microsoft.Graph.GroupMembersCollectionWithReferencesPage' to type 'Microsoft.Graph.Group'

Unable to cast object of type 'Microsoft.Graph.GroupMembersCollectionWithReferencesPage' to type 'Microsoft.Graph.Group'. Please give me any solution , I got above error when I try to fetch azure group members by using Microsoft graph API. I used…
0
votes
1 answer

Export members of multiple groups

Is it possible to change the PS script below in two ways: The group members are now exported horizontally but I want all the users in 1 cell in the column beside the group name. We have a lot of groups and it is not readable this way. The path to…
Sen
  • 3
  • 3
0
votes
1 answer

Azure AD B2C Group Membership Custom policy

Our current b2c custom policy extension property (where we store permissions) is limited to 255 characters. Therefore, we hit the limit of permissions and we need to expose AAD group memberships through Azure B2C Custom policy. How do we define the…
0
votes
2 answers

How to add a security group as a member of another security group in Azure AD B2C tenant?

I have 2 security groups in AzureAD(B2C tenant) and I want one to be a member of another group. In the GUI, the group is not found when I try to add a new member. I tried to do this with terraform (via Microsoft Graph) and this fails as…
Ilya Chernomordik
  • 27,817
  • 27
  • 121
  • 207
0
votes
1 answer

MS Graph SDK: How to add URL segment to filter for specific member type?

I'd like to get group members from Graph. No problem, the API is there. I now want to filter for members that are groups themselves and there even is a sample for this on the docs page: See the /microsoft.graph.group part of the URL? That's what I…
Heinrich Ulbricht
  • 10,064
  • 4
  • 54
  • 85
0
votes
2 answers

Export the AD Group Membership of a list of users from a CSV Powershell

I am trying to get a CSV output of all the users in the 'VPN Users' group that are also in the 'Domain Users' group. I'd like it to give their name and then their group membership. Each member should only be in the VPN group. I am looking to…
0
votes
1 answer

Getting information from Get-ADPrincipalGroupMembership not working like I hoped

I have a list of users and I need to know what their Active Directory Group memberships are. I need them to group together in a csv something like this with the username, groupname, and grouptype (Security of Distribution) but I'm not having much…
0
votes
1 answer

Powershell: Export group members from external domain

I want to export users of some large groups. The groups are filled with other groups and the members of those groups are users from a trusted external domain. When I run this script if gives an error: $Users = Get-ADGroupMember -Identity 'Group'…
0
votes
1 answer

PowerShell Check User Group Membership

I am writing a powershell script to to change GPO Ownership and I am able to change the Ownership of the GPO's to a new user. What I am wanting to do is verify that the current owner of the GPO is no long an employee. This is for a school…
Soulless Rekkr
  • 115
  • 1
  • 3
  • 12
0
votes
3 answers

How do I add a variable as a column value in a result set?

I have a variable that loops through values from a CSV file. As the loop returns result sets for each value I have in the CSV, I also want that value (the variable) returned in the result set. I tried to add my variable, $user, in my Select…
0
votes
2 answers

-Like, -Match in subarray

I am working on getting a list of inactive users from Active Directory with Search-ADAccount then piping that to Get-ADUser so I can use where MemberOf does not contain the group "Accounts_to_Keep". I believe I have it working with the correct…
0
votes
1 answer

UserPrincipal.GetGroups leaking

I've tracked down a leak to my group enumeration code. I've written a test routine and I'm trying to dispose of everything but still it leaks. Does anyone see what I'm doing wrong? In my test, I call it 100 times in a row and on my small domain,…
Iunknown
  • 347
  • 1
  • 2
  • 16
0
votes
1 answer

What powershell commands are needed to add a group A from domain A as member of group B in domain B?

I want to be able to add Group A from forest A as a member of Group B in forest B. In both forests I have credentials with the Domain Administrator permissions. I have tried several things but it does not work cross-forest and I have tried several…