I’m trying to get the following information from get-adgroupmember and get-adgroup groupname, groupdescription, groupinfo and groupmembers using the following script
Here is the error(s) I’m seeing:
Get-ADGroupMember : Cannot bind parameter ‘Identity’. Cannot create object of type “Microsoft.ActiveDirectory.Management.ADGroup”. The adapter cannot set the value of property “Name”.
Got it to work sort of…
The following script works, but it only displays the ADGROUPS that contain members. My goal would be to list all groups contained in $GNames that is to say include the ADGROUPS with no group members.
Hello Olaf;
Thank you for your suggestion it gets me a whole lot closer to what I’m looking for! On problem remains when there is more than one member I’m getting the following display in the Members column:
System.Object
Here is actual output in $results for the row displaying System.Object:
{jsmith, jdoe}
Produces the following output
name GroupName Description Info
park dgVPN-XXSVDI Two factor VPN - Access to XXS VDI
kim dgVPN-XXSVDI Two factor VPN - Access to XXS VDI
chs dgVPN-XXSVDI Two factor VPN - Access to XXS VDI
aroney dgVPN-XXSVDI Two factor VPN - Access to XXS VDI
ngelpo dgVPN-XXSVDI Two factor VPN - Access to XXS VDI
davis dgVPN-XXSVDI Two factor VPN - Access to XXS VDI
amagna dgVPN-XXSVDI Two factor VPN - Access to XXS VDI
krivan dgVPN-XXSVDI Two factor VPN - Access to XXS VDI
arr dgVPN-XXSVDI Two factor VPN - Access to XXS VDI
ivilla dgVPN-XXSVDI Two factor VPN - Access to XXS VDI
row BudgetCopyRO
clure BudgetCopyRO
As you can see there are two ADGroups containing multiple members, again your suggestion gets me very close to what I’m looking for, only issue is the output of group members.
Hello kvprasoon,
Well that worked thank you!! Now the next question is why, don’t understand why your suggestion worked. If you don’t have the time to explain that’s okay.