3 Responses to “Creating a custom list with UPS information”

  1. KEF May 22, 2012 at 1:09 am #

    Is there a way to exclude certain users and groups from the output?

    Great script!

    • Andrew Toh May 23, 2012 at 10:40 am #

      Yes, just add an IF statement in the for loop, e.g.

      foreach($profile in $AllProfiles)
      {
      #Select the values to extract from the User Profile Service.
      $AccountName = $profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::AccountName].Value
      $DisplayName = $profile.DisplayName
      IF ($DisplayName -ne “Test User” -or $DisplayName -ne “Test User 2”)
      {
      rest of the script
      }

  2. Ram November 11, 2014 at 10:09 pm #

    Hi,

    Nice post.

    Is it possible to populate a “Person or Group” column with “AccountName” or “DisplayName” user profile property using the above script?

    I created a text column and it is working, but not with “Person or Group”.

Leave a Reply

%d bloggers like this: