Scripts

Get OU Name from SfB User

When dealing with moving or migrating users, you want to do it in batches.  Now yes, you could do this a lot easier.  But I wanted to run it from a SfB centric view, where you don’t have a lot of AD attributes.  This script will take something from the get-csuser cmdlet and get infromation about the user from AD.  Specifically, this is getting the name of the parent OU.  You could continue to go up the tree indefiently too.  But this script is more about how to get AD stuff and get the OU

get-csuser | %{get-aduser -Identity $_.DistinguishedName -properties *} | select name,@{Name=”Parent”;Expression={(([ADSI]”LDAP://$_”).psbase.parent.name)}}

52 thoughts on “Get OU Name from SfB User

  1. Pingback: cialis shop online
  2. Pingback: generic cialis
  3. Pingback: buy viagra online
  4. Pingback: cialis purchase
  5. Pingback: order viagra
  6. Pingback: buy cialis 20 mg
  7. Pingback: benadryl
  8. Pingback: buy cheap viagra
  9. Pingback: buy Zovirax
  10. Pingback: viagra for sale
  11. Pingback: viagra connect cvs
  12. Pingback: viagra pill
  13. Pingback: cialis vs viagra
  14. Pingback: pharmacy online
  15. Pingback: online viagra
  16. Pingback: customer essay
  17. Pingback: cheap ed pills
  18. Pingback: viagra canada
  19. Pingback: cialis walmart
  20. Pingback: viagra sale
  21. Pingback: tadalafil 20 mg
  22. Pingback: levitra 20 mg
  23. Buy Priligy Dapoxetine United States Keflex Package Insert Isotretinoin Cheap Internet With Free Shipping Over Night [url=http://cialibuy.com]Buy Cialis[/url] Euroclinix Generico Flagyl Amoxil

Leave a Reply

Your email address will not be published. Required fields are marked *