Validate group members

I am trying to check members under a group in Server Manager in Windows 2008 R2 using Powershell. For this I used
#AD Drive not created through the below step
$Env:ADPS_LoadDefaultDrive = 0
#Module imported
Import-Module ActiveDirectory
#Get list of groupmembers
Get-ADGroupMember -identity “Administrators” | select name | Export-csv -path C:\Groupmembers.csv -NoTypeInformation

(Post Script)
My question is am held up with an error after executing the script saying
“Get-ADGroupMember : The server has rejected the client credentials.”
Help me in getting through it

Hi Shanthi,

  1. have you opened your powershell with administrative credentials (Run as Administrator)
  2. you can use -credential to specify credential to get the information.

check out this Pic

Thank you Dhandapani K.

Hi Shanthi,

Is you prob solved?. u got the output.
Is it worked?
Just let me know plz.

Yeah it is done Dhandapani…:slight_smile:

Thanks for your reply. this is the first question I answered in this site. also in my career in powershell.

Thats great!!