Link to home
Start Free TrialLog in
Avatar of AhmedAliShaik
AhmedAliShaikFlag for India

asked on

Getting employee id value in windows 2008 powershell.

I want the give the command as a input to variable in a script

The output is in the below format:
EmployeeId
---------
e1
e2
e3
e4

$empid = Get-Adgroup -identity groupname | get-adgroupmember | get-aduser -properties * |select employeeid

Open in new window


when i check the output using write-host $empid i am getting
@{employeeid=e1},@{employeeid=e2}....

how do i get the values e1 ,e2 ,e3 stored in the variable,
ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany 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 AhmedAliShaik

ASKER

Thanks Qlemo,

I will run and post you.
Qlemo Thanks a lot.
Thanks.