Link to home
Start Free TrialLog in
Avatar of bsharath
bsharathFlag for India

asked on

Powershell script that gets few fields of a group. need a change to fetch for a User.

Hi,.

Powershell script that gets few fields of a group. need a change to fetch for a User.

Can anyone help with a way to fetch from a user

REgards
Sharath
Get-PsSnapIn -Reg | Add-PsSnapIn -EA 0 
Get-Content "d:\GetData.txt" | %{ 
  $Group = Get-QADGroup $_ -IncludedProperties LegacyExchangeDN 
 
  If ($Group -eq $Null -Or ([Array]$Group).Count -ne 1) 
  { 
    $_ >> "CouldNotFindGroup.txt" 
  } 
  Else 
  { 
    $Group 
  } 
} | Select-Object Name, LegacyExchangeDN, Email, MailNickName | Export-CSV "SomeFile.csv"

Open in new window

Avatar of dicconb
dicconb
Flag of United Kingdom of Great Britain and Northern Ireland image

On line 3 replace Get-QADGroup with GetQADUser.

D
ASKER CERTIFIED SOLUTION
Avatar of dicconb
dicconb
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bsharath

ASKER

Thanks
No problem, thanks for the quick accept! D