3

I am importing data into a SharePoint list. One of the columns is the user's login/name which links to their profile via their SharePoint user id.

FARMURL/userdisp.aspx?ID=56

In order to import correctly, I first need to pull out the id and login, so that I can match them to their appropriate rows, then import the data accordingly.

How can I get the logins and ids?

1 Answer 1

3

This could work, but only for a given SPWeb:

Get-SPUser -Web http://localhost | ForEach-Object { $_.Id }
1
  • 2
    To get the name you can try $_.Name, like this: ForEach-Object{ "" + $_.Id + " " + $_.Name }
    – eirikb
    Sep 20, 2012 at 5:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.